diff options
author | João Valverde <j@v6e.pt> | 2022-06-19 00:31:30 +0100 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-06-20 17:29:57 +0000 |
commit | 0615ba6317466b281769db4848704f250ff494b7 (patch) | |
tree | 9c6fdfa8074dfaa496bca1f4886e3f8cd7b5616c /epan/wslua/wslua_field.c | |
parent | 0cadfff04aab0fde9999b0b7cd14806a693a0a6e (diff) |
ftypes: Make accessor functions type safe
Diffstat (limited to 'epan/wslua/wslua_field.c')
-rw-r--r-- | epan/wslua/wslua_field.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/wslua/wslua_field.c b/epan/wslua/wslua_field.c index b8b0446593..8c77a55630 100644 --- a/epan/wslua/wslua_field.c +++ b/epan/wslua/wslua_field.c @@ -144,7 +144,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { case FT_ABSOLUTE_TIME: case FT_RELATIVE_TIME: { NSTime nstime = (NSTime)g_malloc(sizeof(nstime_t)); - *nstime = *(NSTime)fvalue_get(&(fi->ws_fi->value)); + *nstime = *fvalue_get_time(&(fi->ws_fi->value)); pushNSTime(L,nstime); return 1; } @@ -177,7 +177,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { case FT_OID: { ByteArray ba = g_byte_array_new(); - g_byte_array_append(ba, (const guint8 *) fvalue_get(&fi->ws_fi->value), + g_byte_array_append(ba, fvalue_get_bytes(&fi->ws_fi->value), fvalue_length(&fi->ws_fi->value)); pushByteArray(L,ba); return 1; @@ -185,7 +185,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { case FT_PROTOCOL: { ByteArray ba = g_byte_array_new(); - tvbuff_t* tvb = (tvbuff_t *) fvalue_get(&fi->ws_fi->value); + tvbuff_t* tvb = fvalue_get_protocol(&fi->ws_fi->value); guint8* raw; if (tvb != NULL) { raw = (guint8 *)tvb_memdup(NULL, tvb, 0, tvb_captured_length(tvb)); |