bin2o Fix

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

bin2o Fix

Post 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.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post 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;;
Herben
Posts: 107
Joined: Sun Jan 25, 2004 10:25 am

Post by Herben »

fixed and committed. thanks for pointing that out. :)
Post Reply