Check standard error code return values as < 0 instead of == -1

This commit is contained in:
Sam Lantinga committed 2024-08-22 09:04:30 -07:00
1 parent 46d9066a69
commit 037541a0e0
29 files changed
+59 -59

No files matched your search

+1 -1
View File
@@ -361,7 +361,7 @@ static int unifont_load_texture(Uint32 textureID)
}
unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID] = tex;
SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND);
if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) != 0) {
if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) < 0) {
SDL_Log("unifont error: Failed to update texture %" SDL_PRIu32 " data for renderer %d.\n", textureID, i);
}
}