A new patch file for Lua 5.1.4 is available at http://www.lua.org/ftp/patch-lua-5.1.4-3 It combines all patches listed below, including a combined fix for #3 and #9: http://www.lua.org/bugs.html#5.1.4 Apply this patch to a pristine copy of Lua 5.1.4 with: wget http://www.lua.org/ftp/lua-5.1.4.tar.gz tar zxf lua-5.1.4.tar.gz cd lua-5.1.4/src wget http://www.lua.org/ftp/patch-lua-5.1.4-3 patch < patch-lua-5.1.4-3 Use curl -O -R if you don't have wget (e.g., in Mac OS X). This patch is identified by this data: # patch-lua-5.1.4-3 created 2011年03月16日T19:06:31-0300 md5: 998ef7886183f61d3a5ca891a9ce6a79 - sha1: 312d5baf480aa4c61cdc212dcbd10322f020c198 - All feedback welcome. --lhf