diff options
author | Patrick Griffis <tingping@tingping.se> | 2016-08-05 21:08:52 -0400 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2016-08-05 21:08:52 -0400 |
commit | 9d74ceedfdd759d48a8f74d43895ec78c5d20883 (patch) | |
tree | 3810d98a8f1d853dc685d4230f48d4b93da8c688 | |
parent | 034624983b4ece4d8d1f7b604e6f8ce9007c627d (diff) |
python: Fix get_pluginpref()
This relied on undocumented behavior of hexchat_pluginpref_get_int() that has been fixed recently. -1 is the correct failure value.
-rw-r--r-- | plugins/python/python.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c index 34784c3b..88913282 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -1849,7 +1849,7 @@ Module_hexchat_pluginpref_get(PyObject *self, PyObject *args) BEGIN_XCHAT_CALLS(NONE); retint = hexchat_pluginpref_get_int(prefph, var); END_XCHAT_CALLS(); - if ((retint == 0) && (strcmp(retstr, "0") != 0)) + if ((retint == -1) && (strcmp(retstr, "-1") != 0)) ret = PyUnicode_FromString(retstr); else ret = PyLong_FromLong(retint); |