diff options
author | hnOsmium0001 <[email protected]> | 2022-04-27 15:51:19 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-04-27 15:51:19 -0700 |
commit | 5f467c899d1024b01c0d7ba86d9ac2f28878eb55 (patch) | |
tree | da7dadb7bce5cc11e0801d1522e11e9a2f006d79 | |
parent | a0b6646bbd601bfeaf0106cb4c22958c53085cac (diff) |
Fix Utils::OpenCstdioFile reversing binary vs text mode
-rw-r--r-- | source/Utils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/Utils.cpp b/source/Utils.cpp index 5083eb7..1062843 100644 --- a/source/Utils.cpp +++ b/source/Utils.cpp @@ -20,16 +20,16 @@ static FopenModeString GetModeString(Utils::IoMode mode, bool binary) { using namespace Utils; if (binary) { switch (mode) { - case Read: return BRUSSEL_MODE_STRING("r"); - case WriteTruncate: return BRUSSEL_MODE_STRING("w"); - case WriteAppend: return BRUSSEL_MODE_STRING("a"); - } - } else { - switch (mode) { case Read: return BRUSSEL_MODE_STRING("rb"); case WriteTruncate: return BRUSSEL_MODE_STRING("wb"); case WriteAppend: return BRUSSEL_MODE_STRING("ab"); } + } else { + switch (mode) { + case Read: return BRUSSEL_MODE_STRING("r"); + case WriteTruncate: return BRUSSEL_MODE_STRING("w"); + case WriteAppend: return BRUSSEL_MODE_STRING("a"); + } } return nullptr; } |