[HB] Fix bug introduced recently
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 8 Aug 2009 20:37:22 +0000 (16:37 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 2 Nov 2009 19:40:34 +0000 (14:40 -0500)
src/hb-open-type-private.hh

index 26c1cac..29e231e 100644 (file)
@@ -148,7 +148,7 @@ _hb_sanitize_init (hb_sanitize_context_t *context,
 
 #if HB_DEBUG
   fprintf (stderr, "sanitize %p init [%p..%p] (%u bytes)\n",
-          context->blob, context->start, context->end, context->start - context->end);
+          context->blob, context->start, context->end, context->end - context->start);
 #endif
 }
 
@@ -209,7 +209,7 @@ _hb_sanitize_edit (hb_sanitize_context_t *context,
 #define SANITIZE_MEM(B,L) \
        HB_LIKELY (context->start <= CONST_CHARP(B) && \
                   CONST_CHARP(B) < context->end && \
-                  context->end - CONST_CHARP(B) < (L))
+                  context->end - CONST_CHARP(B) >= (L))
 
 #define NEUTER(Var, Val) \
        (SANITIZE_OBJ (Var) && \