[Bug 6525] New: Microchip C18 compiler, fread bug?
Wine Bugs
wine-bugs at winehq.org
Wed Oct 25 22:09:01 CDT 2006
http://bugs.winehq.org/show_bug.cgi?id=6525
Summary: Microchip C18 compiler, fread bug?
Product: Wine
Version: 0.9.23.
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wine-msvcrt
AssignedTo: wine-bugs at winehq.org
ReportedBy: user_2_2_3 at yahoo.com
Microchip's C18 compiler (v2.40) no longer works under wine. More specifically,
when I try to compile with it, it fails claiming the code has an error on line
0 (btw, line numbering starts at 1).
I used git and found that a change to 'fread' in dlls/msvcrt/file.c back in
july was the culprit. In that patch, 'fread' was changed to use a 'while'
loop containing a '_read(file->_file,ptr, rcnt);'. Basically, 'ptr' (the
destination for the data) isn't getting updated in between successive '_read's.
In the latest source (that I've seen) this bug has mulitplied with the addition
of a 'memcpy(ptr, file->_ptr, i);' in the same loop.
A couple well-placed 'if( i > 0 ) ptr = (char*)ptr + i;' should fix this.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list