Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Jun 26, 2017
1 parent db7ea80 commit 10613b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lsproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ decode(const struct sproto_arg *args) {
// notice: in lua 5.2, 52bit integer support (not 64)
if (args->extra) {
// lua_Integer is 32bit in small lua.
uint64_t v = *(uint64_t*)args->value;
int64_t v = *(int64_t*)args->value;
lua_Number vn = (lua_Number)v;
vn /= args->extra;
lua_pushnumber(L, vn);
} else {
lua_Integer v = *(uint64_t*)args->value;
lua_Integer v = *(int64_t*)args->value;
lua_pushinteger(L, v);
}
break;
Expand Down

0 comments on commit 10613b7

Please sign in to comment.