aboutsummaryrefslogtreecommitdiff
path: root/uxd.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-12-23 14:07:50 -0500
committerB. Watson <urchlay@slackware.uk>2024-12-23 14:07:50 -0500
commite7d59f1e6ef99573b7432dbbeab25da6d7289c4b (patch)
tree8934630417c38250aa23e60950f9f9d39b654d38 /uxd.c
parent6d2c1195f8a3792da1749466b6af587b2154062c (diff)
downloaduxd-e7d59f1e6ef99573b7432dbbeab25da6d7289c4b.tar.gz
force binary mode for stdin (might help with a windows port?)
Diffstat (limited to 'uxd.c')
-rw-r--r--uxd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/uxd.c b/uxd.c
index ef86bb7..a91520c 100644
--- a/uxd.c
+++ b/uxd.c
@@ -188,6 +188,7 @@ void version(void) {
void open_input(const char *arg) {
if(!arg || (strcmp(arg, "-") == 0)) {
input = stdin;
+ freopen(NULL, "rb", stdin);
} else {
input = fopen(arg, "rb");
if(!input) {