[ros-diffs] [greatlrd] 22155: fix so fread return right value of bytes/chars it reads make one more wine test pass in msvcrt file

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Thu Jun 1 20:20:34 CEST 2006


Author: greatlrd
Date: Thu Jun  1 22:20:34 2006
New Revision: 22155

URL: http://svn.reactos.ru/svn/reactos?rev=22155&view=rev
Log:
fix so fread return right value of bytes/chars it reads 
make one more wine test pass in msvcrt file

Modified:
    trunk/reactos/lib/crt/stdio/fread.c

Modified: trunk/reactos/lib/crt/stdio/fread.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/stdio/fread.c?rev=22155&r1=22154&r2=22155&view=diff
==============================================================================
--- trunk/reactos/lib/crt/stdio/fread.c (original)
+++ trunk/reactos/lib/crt/stdio/fread.c Thu Jun  1 22:20:34 2006
@@ -81,5 +81,8 @@
        }
     }
   }
-  return count - (to_read/size);
+  // return   count - (to_read/size)  
+  /* FIXME is this formual right ?, I copy the formula from djgpp 
+     in our  to_read or copy ? */
+  return size != 0 ? count - ((to_read + size - 1) / size) : 0;
 }




More information about the Ros-diffs mailing list