aboutsummaryrefslogtreecommitdiff
path: root/vc6
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-08-25 18:24:57 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-08-25 18:31:09 +0300
commit50919ed69ff64df51d8d586d00834fde3e901785 (patch)
tree165f2d1bb241fd0448992d9f1b1e9e5630db64df /vc6
parent4cf702d85069db13f04b06dbe1ce4b1a0314dafc (diff)
downloadluafilesystem-50919ed69ff64df51d8d586d00834fde3e901785.tar.gz
luafilesystem-50919ed69ff64df51d8d586d00834fde3e901785.tar.bz2
luafilesystem-50919ed69ff64df51d8d586d00834fde3e901785.zip
Fix lfs.attributes and lfs.symlinkattributes extra argument handling
When the second argument is not a string, _file_info() wants to ensure that there is a table on top of the stack: the second argument or a new table. If a new table is pushed it's created on top immediately, but if a table is passed as the second argument it can be followed by extra arguments, with the last one ending up being used as a table, causing a crash. The fix is to remove any potential extra arguments using `lua_settop(L, 2)`. Also added a few tests for this case. Ref #80.
Diffstat (limited to 'vc6')
0 files changed, 0 insertions, 0 deletions