diff options
Diffstat (limited to 'cpp/src/IcePatch2/FileServerI.cpp')
-rw-r--r-- | cpp/src/IcePatch2/FileServerI.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index bb7ef6d203f..eac1790deba 100644 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -112,11 +112,12 @@ IcePatch2::FileServerI::getFileCompressed(const string& pa, Int pos, Int num, co ByteSeq bytes(num); #ifdef _WIN32 - long r; + int r; + if((r = read(fd, &bytes[0], static_cast<unsigned int>(num))) == -1) #else ssize_t r; -#endif if((r = read(fd, &bytes[0], static_cast<size_t>(num))) == -1) +#endif { close(fd); |