Skip to content

Commit 539f7a7

Browse files
fix for pbf reading from stdin: set binary mode
Co-authored-by: Jochen Topf <[email protected]>
1 parent 7cdffd2 commit 539f7a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/osmium/io/detail/read_write.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ namespace osmium {
104104
#endif
105105

106106
if (filename.empty() || filename == "-") {
107+
#ifdef _WIN32
108+
_setmode(0, _O_BINARY);
109+
#endif
107110
return 0; // stdin
108111
}
109112

0 commit comments

Comments
 (0)