From e949b18d828d799619fabd27476e05edf35d0d02 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sat, 22 Mar 2008 01:00:25 +0000 Subject: Fix ticket #670. --- numpy/core/src/ufuncobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/src/ufuncobject.c') diff --git a/numpy/core/src/ufuncobject.c b/numpy/core/src/ufuncobject.c index 4f5b29825..8a4f828d8 100644 --- a/numpy/core/src/ufuncobject.c +++ b/numpy/core/src/ufuncobject.c @@ -3440,7 +3440,7 @@ typedef struct { static int cmp_arg_types(int *arg1, int *arg2, int n) { - while (n--) { + for (;n>0; n--, arg1++, arg2++) { if (PyArray_EquivTypenums(*arg1, *arg2)) continue; if (PyArray_CanCastSafely(*arg1, *arg2)) return -1; -- cgit v1.2.1