From RuudS:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 17 Dec 2007 09:00:45 +0000 (09:00 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 17 Dec 2007 09:00:45 +0000 (09:00 +0000)
Patch to LUA to implement byte arrays.

This fixes bug 2110.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23896 f5534014-38df-0310-8fa8-9805f1628bb7

epan/wslua/wslua_tree.c

index bc0c7d35244560b9254c88bb96eaed4f086a1891..ca186593e8c0624573825ebf383c92fb64e64c82 100644 (file)
@@ -119,10 +119,12 @@ static int TreeItem_add_item_any(lua_State *L, gboolean little_endian) {
                 case FT_STRINGZ:
                     item = proto_tree_add_string(tree_item->tree,hfid,tvbr->tvb,tvbr->offset,tvbr->len,luaL_checkstring(L,1));
                     break;
+                case FT_BYTES:
+                    item = proto_tree_add_bytes(tree_item->tree,hfid,tvbr->tvb,tvbr->offset,tvbr->len, (const guint8*) luaL_checkstring(L,1));
+                    break;
                 case FT_UINT64:
                 case FT_INT64:
                 case FT_ETHER:
-                case FT_BYTES:
                 case FT_UINT_BYTES:
                 case FT_IPv4:
                 case FT_IPv6: