diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:51 +0000 |
commit | e27759aa56732ec1423a104333c1d88f5ddd7efb (patch) | |
tree | 489b146d4effcec44f246eb0b4d1c9f269c94b43 /epan/wslua/wslua_byte_array.c | |
parent | Adding upstream version 4.2.4. (diff) | |
download | wireshark-e27759aa56732ec1423a104333c1d88f5ddd7efb.tar.xz wireshark-e27759aa56732ec1423a104333c1d88f5ddd7efb.zip |
Adding upstream version 4.2.5.upstream/4.2.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/wslua/wslua_byte_array.c')
-rw-r--r-- | epan/wslua/wslua_byte_array.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/wslua/wslua_byte_array.c b/epan/wslua/wslua_byte_array.c index b0449912..6e6ae304 100644 --- a/epan/wslua/wslua_byte_array.c +++ b/epan/wslua/wslua_byte_array.c @@ -214,7 +214,7 @@ WSLUA_METHOD ByteArray_get_index(lua_State* L) { luaL_argerror(L,2,"index out of range"); return 0; } - lua_pushinteger(L,ba->data[idx]); + lua_pushnumber(L,ba->data[idx]); WSLUA_RETURN(1); /* The value [0-255] of the byte. */ } @@ -255,7 +255,7 @@ WSLUA_METHOD ByteArray_le_int(lua_State* L) { value |= (guint8)ba->data[offset + i]; } - lua_pushinteger(L, value); + lua_pushnumber(L, value); WSLUA_RETURN(1); /* The value of the little endian encoded signed integer beginning at given offset with given length. */ } @@ -337,7 +337,7 @@ WSLUA_METHOD ByteArray_le_uint(lua_State* L) { value |= (guint8)ba->data[offset + i]; } - lua_pushinteger(L, value); + lua_pushnumber(L, value); WSLUA_RETURN(1); /* The value of the little endian encoded unsigned integer beginning at given offset with given length. */ } @@ -419,7 +419,7 @@ WSLUA_METHOD ByteArray_int(lua_State* L) { value |= (guint8)ba->data[offset + i]; } - lua_pushinteger(L, value); + lua_pushnumber(L, value); WSLUA_RETURN(1); /* The value of the big endian encoded 32 bit signed integer beginning at given offset with given length. */ } @@ -501,7 +501,7 @@ WSLUA_METHOD ByteArray_uint(lua_State* L) { value |= (guint8)ba->data[offset + i]; } - lua_pushinteger(L, value); + lua_pushnumber(L, value); WSLUA_RETURN(1); /* The value of the big endian encoded 32 bit unsigned integer beginning at given offset with given length. */ } @@ -551,7 +551,7 @@ WSLUA_METHOD ByteArray_len(lua_State* L) { /* Obtain the length of a <<lua_class_ByteArray,`ByteArray`>>. */ ByteArray ba = checkByteArray(L,1); - lua_pushinteger(L,(lua_Integer)ba->len); + lua_pushnumber(L,(lua_Number)ba->len); WSLUA_RETURN(1); /* The length of the <<lua_class_ByteArray,`ByteArray`>>. */ } |