mirror of
https://github.com/hexchat/hexchat.git
synced 2024-11-10 05:02:50 +01:00
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.
This commit is contained in:
parent
034624983b
commit
9d74ceedfd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user