From dd9e8a96e3ec7a7698c36e3612fbda12d7de2d0f Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sat, 17 Jun 2017 17:42:07 +1000 Subject: src/lstrlib.js: a 'long' is 4 bytes in JS --- src/lstrlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lstrlib.js b/src/lstrlib.js index 6cd4a80..b21690b 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -449,8 +449,8 @@ const getoption = function(h, fmt) { case 'B'.charCodeAt(0): r.size = 1; r.opt = KOption.Kuint; return r; case 'h'.charCodeAt(0): r.size = 2; r.opt = KOption.Kint; return r; // sizeof(short): 2 case 'H'.charCodeAt(0): r.size = 2; r.opt = KOption.Kuint; return r; - case 'l'.charCodeAt(0): r.size = 8; r.opt = KOption.Kint; return r; // sizeof(long): 8 - case 'L'.charCodeAt(0): r.size = 8; r.opt = KOption.Kuint; return r; + case 'l'.charCodeAt(0): r.size = 4; r.opt = KOption.Kint; return r; // sizeof(long): 4 + case 'L'.charCodeAt(0): r.size = 4; r.opt = KOption.Kuint; return r; case 'j'.charCodeAt(0): r.size = 4; r.opt = KOption.Kint; return r; // sizeof(lua_Integer): 4 case 'J'.charCodeAt(0): r.size = 4; r.opt = KOption.Kuint; return r; case 'T'.charCodeAt(0): r.size = 8; r.opt = KOption.Kuint; return r; // sizeof(size_t): 8 -- cgit v1.2.3-70-g09d2