diff options
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/obj_simple.c | 6 |
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: |