replace internal uses of gettimeofday with monotonic time where appropriate. make...
[lcore.git] / fastmd5.pas
index 6455e5cff31b69b770fa3ad0f55552780224b0c6..27755b90bf51707a02341426dd5b4ca5c352a3d6 100644 (file)
@@ -39,7 +39,7 @@ type
 {$i uint32.inc}\r
 \r
 type\r
-  dvar=array[0..0] of byte;\r
+  dvar=array[0..65535] of byte;\r
   Tmd5state=record\r
     buf:array[0..63] of byte;\r
     H:array[0..3] of uint32;\r
@@ -211,7 +211,7 @@ begin
   b := state.msglen and 63;\r
 \r
   inc(state.msglen,len);\r
-  while (state.msglen > $20000000) do begin\r
+  while (state.msglen >= $20000000) do begin\r
     dec(state.msglen,$20000000);\r
     inc(state.msglenhi);\r
   end;\r