mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] Re: Exception Invalid_argument("out-of-bound array or


From: Samuel Tardieu
Subject: [Mldonkey-users] Re: Exception Invalid_argument("out-of-bound array or string access") with MLDonkey 2.02-5CVS
Date: Tue, 14 Jan 2003 16:39:51 +0100
User-agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Military Intelligence, i386--freebsd)

>>>>> "mldonkey" == mldonkey  <address@hidden> writes:

mldonkey> Someone can publish a patch ? You need to change the code in
mldonkey> donkey/donkeyInteractive.ml:

--- donkey/donkeyInteractive.ml 14 Jan 2003 11:54:15 -0000      1.24
+++ donkey/donkeyInteractive.ml 14 Jan 2003 15:38:53 -0000
@@ -816,11 +816,12 @@
         P.file_chunks = (
           let nchunks = file.file_nchunks in
           let s = String.make file.file_nchunks '0' in
-          for i = 0 to nchunks - 1 do
-            match file.file_chunks.(i) with
-              PresentTemp | PresentVerified -> s.[i] <- '1'
-            | _ -> ()
-          done;
+          if file.file_chunks <> [||] then
+            for i = 0 to nchunks - 1 do
+              match file.file_chunks.(i) with
+                PresentTemp | PresentVerified -> s.[i] <- '1'
+              | _ -> ()
+            done;
           s
         );          
         P.file_availability = String2.init file.file_nchunks (fun i ->





reply via email to

[Prev in Thread] Current Thread [Next in Thread]