forked from osmocom/wireshark
Return ByteArray as "value" for FieldInfo's with type FT_NONE (which has data).
This fixes bug 5201. svn path=/trunk/; revision=51903
This commit is contained in:
parent
8fbfb0f4fd
commit
408b498a12
|
@ -62,9 +62,6 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) {
|
||||||
FieldInfo fi = checkFieldInfo(L,1);
|
FieldInfo fi = checkFieldInfo(L,1);
|
||||||
|
|
||||||
switch(fi->hfinfo->type) {
|
switch(fi->hfinfo->type) {
|
||||||
case FT_NONE:
|
|
||||||
lua_pushnil(L);
|
|
||||||
return 1;
|
|
||||||
case FT_BOOLEAN:
|
case FT_BOOLEAN:
|
||||||
lua_pushboolean(L,(int)fvalue_get_uinteger(&(fi->value)));
|
lua_pushboolean(L,(int)fvalue_get_uinteger(&(fi->value)));
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -146,6 +143,12 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) {
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
case FT_NONE:
|
||||||
|
if (fi->length == 0) {
|
||||||
|
lua_pushnil(L);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
/* FALLTHROUGH */
|
||||||
case FT_BYTES:
|
case FT_BYTES:
|
||||||
case FT_UINT_BYTES:
|
case FT_UINT_BYTES:
|
||||||
case FT_GUID:
|
case FT_GUID:
|
||||||
|
|
Loading…
Reference in New Issue