Commits

Matt Chaput committed 6bd75cd

Fixed bugs in (unused) first_diff function.

  • Participants
  • Parent commits 2e8b9bf

Comments (0)

Files changed (1)

src/whoosh/util.py

     byte.
     """
 
-    i = -1
+    i = 0
     for i in xrange(0, len(a)):
-        if a[i] != b[1]:
-            return i
-        if i == 255:
-            return i
+        if a[i] != b[i] or i == 255:
+            break
+    return i
 
 
 def prefix_encode(a, b):