Page 1 of 1

bin2o Fix

Posted: Sat Aug 12, 2006 7:02 pm
by evilo
I noticed this little correction in the psp svn repository for bin2o, and most of all noticed that the bug is also present in the ps2 sdk.

http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=1

Since I have no svn access from where I am (holiday), if there is a motivated soul ...

evilo.

Posted: Tue Aug 22, 2006 8:50 am
by jimparis
that link was wrong, here is the fix he's talking about:

Code: Select all

Index: bps2sdk/tools/bin2o/src/in2o.c
===================================================================
--- ps2sdk/tools/bin2o/src/bin2o.c     (revision 1314)
+++ ps2sdk/tools/bin2o/src/bin2o.c     (working copy)
@@ -358,7 +358,7 @@
     if &#40;fd_size < end&#41;
        end = fd_size;
     
-    if &#40;end < &#40;size + start&#41;&#41;
+    if &#40;end < &#40;size - start&#41;&#41;
        size = end - start;
 
     buffer = malloc&#40;size&#41;;

Posted: Wed Nov 22, 2006 4:12 pm
by Herben
fixed and committed. thanks for pointing that out. :)