aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/wslua/wslua_gui.c')
-rw-r--r--epan/wslua/wslua_gui.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/epan/wslua/wslua_gui.c b/epan/wslua/wslua_gui.c
index 56efdac858..b73564eff9 100644
--- a/epan/wslua/wslua_gui.c
+++ b/epan/wslua/wslua_gui.c
@@ -361,13 +361,10 @@ WSLUA_METHOD ProgDlg_close(lua_State* L) { /* Closes the progress dialog. */
static int ProgDlg__tostring(lua_State* L) {
ProgDlg pd = checkProgDlg(L,1);
- char *str;
- str = wmem_strdup_printf(NULL, "%sstopped",pd->stopped?"":"not ");
- lua_pushstring(L, str);
- wmem_free(NULL, str);
+ lua_pushfstring(L, "%sstopped",pd->stopped?"":"not ");
- return 0;
+ WSLUA_RETURN(1); /* A string specifying whether the Progress Dialog has stopped or not. */
}
/* Gets registered as metamethod automatically by WSLUA_REGISTER_CLASS/META */