summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/language.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/language.cpp')
-rw-r--r--src/lib/util/language.cpp7
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;
}