[Unison-hackers] [unison-svn] r408 - trunk/src

vouillon@seas.upenn.edu vouillon at seas.upenn.edu
Fri Jan 22 07:50:07 EST 2010


Author: vouillon
Date: 2010-01-22 07:50:07 -0500 (Fri, 22 Jan 2010)
New Revision: 408

Modified:
   trunk/src/RECENTNEWS
   trunk/src/fingerprint.ml
   trunk/src/mkProjectInfo.ml
Log:
* Fixed "assertion failed" error introduced in last commit...


Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2010-01-22 10:26:14 UTC (rev 407)
+++ trunk/src/RECENTNEWS	2010-01-22 12:50:07 UTC (rev 408)
@@ -1,5 +1,10 @@
 CHANGES FROM VERSION 2.39.6
 
+* Fixed "assertion failed" error introduced in last commit...
+
+-------------------------------
+CHANGES FROM VERSION 2.39.6
+
 * Fixed bug which made Unison ignore finder information and resource
   fork when compiled to 64bit on Mac OSX.
 * Use asynchronous I/O under Windows

Modified: trunk/src/fingerprint.ml
===================================================================
--- trunk/src/fingerprint.ml	2010-01-22 10:26:14 UTC (rev 407)
+++ trunk/src/fingerprint.ml	2010-01-22 12:50:07 UTC (rev 408)
@@ -81,10 +81,11 @@
 let dummy = ""
 
 let hash d =
-  if d == dummy then
+  let l = String.length d in
+  if l = 0 then
     1234577
   else begin
-    assert (String.length d >= 3);
+    assert (l >= 3);
     Char.code (String.unsafe_get d 0) +
     (Char.code (String.unsafe_get d 1) lsl 8) +
     (Char.code (String.unsafe_get d 2) lsl 16)

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2010-01-22 10:26:14 UTC (rev 407)
+++ trunk/src/mkProjectInfo.ml	2010-01-22 12:50:07 UTC (rev 408)
@@ -99,3 +99,4 @@
 
 
 
+



More information about the Unison-hackers mailing list