diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-03-26 22:28:04 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-03-26 22:28:04 +0000 |
commit | 1da3aae53bd0db021362f1aea9b0c634e57a3cb7 (patch) | |
tree | 062b0df9ad7a91aed3873999fed9648b76d08591 /numpy/core/src/arrayobject.c | |
parent | 2ff5b35b2ce3fd485cedf8d9345b25065b8bc94d (diff) | |
download | numpy-1da3aae53bd0db021362f1aea9b0c634e57a3cb7.tar.gz |
Fix ticket #476: string comparisons with leading NULL
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index a55221d5e..8ec1e6b47 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -4297,7 +4297,7 @@ _mystrncmp(char *s1, char *s2, int len1, int len2) int val; int diff; - val = strncmp(s1, s2, MIN(len1, len2)); + val = memcmp(s1, s2, MIN(len1, len2)); if ((val != 0) || (len1 == len2)) return val; if (len2 > len1) {sptr = s2+len1; val = -1; diff=len2-len1;} else {sptr = s1+len2; val = 1; diff=len1-len2;} |