diff options
author | 2024-02-25 02:27:26 +1100 | |
---|---|---|
committer | 2024-02-25 02:27:26 +1100 | |
commit | 1615b8551a3a73532ac234973cfb04dd8ed98ba4 (patch) | |
tree | 25575506b4117afa614b94b4370af7f16eb9dbb5 /src/lib/util/language.cpp | |
parent | 334ec12e0043ef939be418283235e3dbe5a005fe (diff) |
util/ioprocs.cpp: Added wrappers for common patterns. (#11608)
emu/diimage.h: Removed fread overloads that allocate memory for output.
util/core_file.cpp: Changed output size of load to size_t.
Diffstat (limited to 'src/lib/util/language.cpp')
-rw-r--r-- | src/lib/util/language.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/util/language.cpp b/src/lib/util/language.cpp index 3a00fe80ad7..50b518acd1b 100644 --- a/src/lib/util/language.cpp +++ b/src/lib/util/language.cpp @@ -61,11 +61,10 @@ void load_translation(random_read &file) return; } - std::size_t read; - file.read(translation_data.get(), size, read); - if (read != size) + auto const [err, actual] = read(file, translation_data.get(), size); + if (err || (actual != size)) { - osd_printf_error("Error reading translation file: requested %u bytes but got %u bytes\n", size, read); + osd_printf_error("Error reading translation file: requested %u bytes but got %u bytes\n", size, actual); translation_data.reset(); return; } |