From David Carne:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 3 Feb 2011 23:17:31 +0000 (23:17 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 3 Feb 2011 23:17:31 +0000 (23:17 +0000)
col_set_str simply stores the pointer passed to it, and luaL_checkstring
returns a temporary pointer. Changing col_set_str to col_add_str in
Columns_newindex seems to fix the issue.

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

epan/wslua/wslua_pinfo.c

index 1e141a4415d91b8175cfc6d32c4b65b128455839..51cd1bc5ca98719f8a7f3f4eed84a12a8b0d5dbe 100644 (file)
@@ -502,7 +502,7 @@ WSLUA_METAMETHOD Columns__newindex(lua_State *L) {
 
     for(cn = colnames; cn->name; cn++) {
         if( g_str_equal(cn->name,colname) ) {
-            col_set_str(cols->cinfo, cn->id, text);
+            col_add_str(cols->cinfo, cn->id, text);
             return 0;
         }
     }