summary refs log tree commit diff stats
path: root/plugins/lua/lua.c
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-08-05 21:15:26 -0400
committerPatrick Griffis <tingping@tingping.se>2016-08-05 21:15:26 -0400
commit19187dbacd6da3d00111b51a9b2f0af17d9d107c (patch)
tree7fa56d0a29a364b64b4fdcd8ade5bdc85a130c24 /plugins/lua/lua.c
parent9d74ceedfdd759d48a8f74d43895ec78c5d20883 (diff)
lua: Fix handling -1 value in pluginpref
Diffstat (limited to 'plugins/lua/lua.c')
-rw-r--r--plugins/lua/lua.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c
index 06e0f6eb..0dc7aeda 100644
--- a/plugins/lua/lua.c
+++ b/plugins/lua/lua.c
@@ -875,7 +875,11 @@ static int api_hexchat_pluginprefs_meta_index(lua_State *L)
 	}
 	if(hexchat_pluginpref_get_str(h, key, str))
 	{
-		lua_pushstring(L, str);
+		/* Wasn't actually a failure */
+		if (!strcmp(str, "-1"))
+			lua_pushinteger(L, r);
+		else
+			lua_pushstring(L, str);
 		return 1;
 	}
 	lua_pushnil(L);