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=2…
==============================================================================
--- 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;
}