aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/helper.cpp
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2010-02-22 10:46:55 -0400
committerHugo Lima <hugo.lima@openbossa.org>2010-02-22 17:41:28 -0300
commitbb887c264a35f550ce9551e84192f73886d2b191 (patch)
treedd883ec354ef607802543af2778535e5dcbdc34f /libshiboken/helper.cpp
parenta71641d51bca4ca7ae4435f7674b7b33dab39457 (diff)
Fix memory corruption due to missing parenthesis in ternary operator
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'libshiboken/helper.cpp')
-rw-r--r--libshiboken/helper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshiboken/helper.cpp b/libshiboken/helper.cpp
index 2072aa99c..62cbb66a7 100644
--- a/libshiboken/helper.cpp
+++ b/libshiboken/helper.cpp
@@ -83,7 +83,7 @@ sequenceToIntArray(PyObject* obj, bool zeroTerminated)
size = PySequence_Size(obj);
- array = new int[size + zeroTerminated ? 1 : 0];
+ array = new int[size + (zeroTerminated ? 1 : 0)];
for (i = 0; i < size; i++) {
PyObject* item = PySequence_GetItem(obj, i);