diff options
Diffstat (limited to 'src/lundump.c')
-rw-r--r-- | src/lundump.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lundump.c b/src/lundump.c index 54de011a..38b04e42 100644 --- a/src/lundump.c +++ b/src/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 2.22 2012/05/08 13:53:33 roberto Exp $ +** $Id: lundump.c,v 2.23 2013/04/26 18:48:35 roberto Exp $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -69,6 +69,13 @@ static lua_Number LoadNumber(LoadState* S) return x; } +static lua_Integer LoadInteger(LoadState* S) +{ + lua_Integer x; + LoadVar(S,x); + return x; +} + static TString* LoadString(LoadState* S) { size_t size; @@ -112,10 +119,13 @@ static void LoadConstants(LoadState* S, Proto* f) case LUA_TBOOLEAN: setbvalue(o,LoadChar(S)); break; - case LUA_TNUMBER: + case LUA_TNUMFLT: setnvalue(o,LoadNumber(S)); break; - case LUA_TSTRING: + case LUA_TNUMINT: + setivalue(o,LoadInteger(S)); + break; + case LUA_TSHRSTR: case LUA_TLNGSTR: setsvalue2n(S->L,o,LoadString(S)); break; default: lua_assert(0); |