fixed build rwops (#6818)

* Fixed build
This commit is contained in:
Sylvain Becker
2022-12-15 10:06:15 +01:00
committed by GitHub
parent c637031294
commit 1e6d4649c0
2 changed files with 5 additions and 5 deletions

View File

@@ -145,7 +145,7 @@ static int unifont_init(const char *fontname)
Uint8 glyphWidth;
Uint32 codepoint;
bytesRead = SDL_RWread(hexFile, hexBuffer, 9);
bytesRead = (size_t)SDL_RWread(hexFile, hexBuffer, 9);
if (numGlyphs > 0 && bytesRead == 0) {
break; /* EOF */
}
@@ -181,7 +181,7 @@ static int unifont_init(const char *fontname)
if (codepointHexSize < 8) {
SDL_memmove(hexBuffer, hexBuffer + codepointHexSize + 1, bytesOverread);
}
bytesRead = SDL_RWread(hexFile, hexBuffer + bytesOverread, 33 - bytesOverread);
bytesRead = (size_t)SDL_RWread(hexFile, hexBuffer + bytesOverread, 33 - bytesOverread);
if (bytesRead < (33 - bytesOverread)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n");
return -1;
@@ -190,7 +190,7 @@ static int unifont_init(const char *fontname)
glyphWidth = 8;
} else {
glyphWidth = 16;
bytesRead = SDL_RWread(hexFile, hexBuffer + 33, 32);
bytesRead = (size_t)SDL_RWread(hexFile, hexBuffer + 33, 32);
if (bytesRead < 32) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n");
return -1;