Skip to content

Commit

Permalink
Change ReadFile(...) == 1 to ReadFile(...) != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-tan committed Jul 4, 2014
1 parent 8feab93 commit 6a24d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/file.d
Expand Up @@ -197,7 +197,7 @@ void[] read(in char[] name, size_t upTo = size_t.max) @trusted
scope(failure) delete buf;

DWORD numread = void;
cenforce(ReadFile(h,buf.ptr, size, &numread, null) == 1
cenforce(ReadFile(h,buf.ptr, size, &numread, null) != 0
&& numread == size, name);
return buf[0 .. size];
}
Expand Down

0 comments on commit 6a24d58

Please sign in to comment.