if (file == NULL)
goto err_out;
+#ifdef _WIN32
+ fd = open(file, O_RDONLY | O_BINARY);
+#else
fd = open(file, O_RDONLY);
+#endif
if (fd < 0)
goto err_free_out;
assert(filled);
assert(filled <= out_len);
out_len -= filled;
- out += filled;
total += filled;
+ if (out)
+ out += filled;
} while (in_len);