|
|
|
|
@ -222,7 +222,7 @@ bool ReadEntry(SDL_RWops *rw, MoEntry *e, std::vector<char> &result)
|
|
|
|
|
return false; |
|
|
|
|
result.resize(e->length + 1); |
|
|
|
|
result.back() = '\0'; |
|
|
|
|
return (SDL_RWread(rw, result.data(), sizeof(char), e->length) == e->length); |
|
|
|
|
return static_cast<uint32_t>(SDL_RWread(rw, result.data(), sizeof(char), e->length)) == e->length; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
@ -329,7 +329,7 @@ void LanguageInitialize()
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// FIXME: Endianness.
|
|
|
|
|
if (SDL_RWread(rw, src.get(), sizeof(MoEntry), head.nbMappings) != head.nbMappings) { |
|
|
|
|
if (static_cast<uint32_t>(SDL_RWread(rw, src.get(), sizeof(MoEntry), head.nbMappings)) != head.nbMappings) { |
|
|
|
|
SDL_RWclose(rw); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
@ -341,7 +341,7 @@ void LanguageInitialize()
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// FIXME: Endianness.
|
|
|
|
|
if (SDL_RWread(rw, dst.get(), sizeof(MoEntry), head.nbMappings) != head.nbMappings) { |
|
|
|
|
if (static_cast<uint32_t>(SDL_RWread(rw, dst.get(), sizeof(MoEntry), head.nbMappings)) != head.nbMappings) { |
|
|
|
|
SDL_RWclose(rw); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|