Wireshark-dev: [Wireshark-dev] [PATCH] ProtoField: Allow BASE_NONE for integer base
From: Alexander Stein <a.stein@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 May 2011 12:29:17 +0200
This is needed by ProtoField.framenum. Specyfing something different
is blocked by wireshark:
> bad argument #2 to 'framenum' (Base must be either BASE_DEC,
> BASE_HEX, BASE_OCT, BASE_DEC_HEX, BASE_DEC_HEX or BASE_HEX_DEC)
---
 epan/wslua/wslua_proto.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/epan/wslua/wslua_proto.c b/epan/wslua/wslua_proto.c
index db4b5da..62d3d36 100644
--- a/epan/wslua/wslua_proto.c
+++ b/epan/wslua/wslua_proto.c
@@ -656,8 +656,8 @@ static int ProtoField_integer(lua_State* L, enum ftenum type) {
     int mask = luaL_optint(L, 5, 0x0);
     const gchar* blob = luaL_optstring(L,6,NULL);
 
-    if (base < BASE_DEC || base > BASE_HEX_DEC) {
-        luaL_argerror(L,2,"Base must be either BASE_DEC, BASE_HEX, BASE_OCT,"
+    if (base < BASE_NONE || base > BASE_HEX_DEC) {
+        luaL_argerror(L,2,"Base must be either BASE_NONE, BASE_DEC, BASE_HEX, BASE_OCT,"
                       " BASE_DEC_HEX, BASE_DEC_HEX or BASE_HEX_DEC");
         return 0;
     }
-- 
1.7.3.4