D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3324 - d1: std.md5: given example not working
Summary: d1: std.md5: given example not working
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: Other Windows
: P2 normal
Assignee: Walter Bright
URL: http://www.digitalmars.com/d/1.0/phob...
Keywords:
: 3331 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-09-17 06:35 UTC by notna
Modified: 2011-01-09 12:29 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description notna 2009-09-17 06:35:02 UTC
In the given example of the D1 std.md5, this line can be found:
while ((len = fread(buffer, 1, buffer.sizeof, file)) != 0)

This isn't working here (DMD v1.042, Windows XP Pro). I had to replace it with:
while ((len = fread(buffer.ptr, 1, buffer.sizeof, file)) != 0)
                           ^^^
Comment 1 notna 2009-09-18 23:54:50 UTC
*** Issue 3331 has been marked as a duplicate of this issue. ***
Comment 2 Andrei Alexandrescu 2011-01-09 08:52:03 UTC
Reassigning D1 issue to Walter.
Comment 3 Brad Roberts 2011-01-09 12:29:49 UTC
Fixed in r2291.