Audaspace: fix incorrect parameter check in python API.
authorJörg Müller <nexyon@gmail.com>
Sat, 23 Jul 2016 11:35:36 +0000 (13:35 +0200)
committerJörg Müller <nexyon@gmail.com>
Sat, 23 Jul 2016 11:35:36 +0000 (13:35 +0200)
Found by PVS-Studio T48917

intern/audaspace/Python/AUD_PyAPI.cpp

index 300fd55e23b912677f08c1a9bbe0d8f4c46ecc3c..de5c0a2f4635cf4bae95170e02d93f862bcbc6b6 100644 (file)
@@ -861,7 +861,7 @@ Factory_filter(Factory* self, PyObject *args)
        py_a_len= py_a ? PySequence_Size(py_a) : 0;
        py_b_len= PySequence_Size(py_b);
 
-       if(!py_b_len || ((py_a != NULL) && !py_b_len))
+       if(!py_b_len || ((py_a != NULL) && !py_a_len))
        {
                PyErr_SetString(PyExc_ValueError, "The sequence has to contain at least one value!");
                return NULL;