summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2009-08-15 15:47:40 +0200
committerTor Andersson <tor@ghostscript.com>2009-08-15 15:47:40 +0200
commit81142a4014d9027e20f5b9d568b63782f75db5f2 (patch)
tree473555061d166fdfb6d1bfbbab7e014a68eb4925 /fitz
parent8a03bee88fac6251ffa71e2864a5ff9d389fa141 (diff)
downloadmupdf-81142a4014d9027e20f5b9d568b63782f75db5f2.tar.xz
Change private function name and use fz_objcmp instead of an internal string comparison function in the name tree lookup.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/obj_simple.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fitz/obj_simple.c b/fitz/obj_simple.c
index 2bd07a01..2611329e 100644
--- a/fitz/obj_simple.c
+++ b/fitz/obj_simple.c
@@ -275,8 +275,10 @@ fz_objcmp(fz_obj *a, fz_obj *b)
return 0;
case FZ_STRING:
- if (a->u.s.len != b->u.s.len)
- return a->u.s.len - b->u.s.len;
+ if (a->u.s.len < b->u.s.len)
+ return -1;
+ if (a->u.s.len > b->u.s.len)
+ return 1;
return memcmp(a->u.s.buf, b->u.s.buf, a->u.s.len);
case FZ_NAME: