Skip to content

Commit be26b2a

Browse files
ernestaskperexg
authored andcommitted
alsaseq: Fix type check in set_time()
SeqEvent_set_time() has fallen victim to the inverted get_long1() return value here, erroring out when called with actual integers. Closes: #17 Signed-off-by: Ernestas Kulik <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 24bd026 commit be26b2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyalsa/alsaseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ SeqEvent_set_time(SeqEventObject *self,
847847
PyObject *val) {
848848
long lval = 0;
849849
const int is_float = PyFloat_Check(val);
850-
const int is_int = is_float ? 0 : get_long1(val, &lval);
850+
const int is_int = is_float ? 0 : !get_long1(val, &lval);
851851

852852
if (!(is_int || is_float)) {
853853
PyErr_Format(PyExc_TypeError,

0 commit comments

Comments
 (0)