Browse Source

testime.c: add valid cast, since the variable as been tested non negative before

Sylvain 2 năm trước cách đây
mục cha
commit
ff3f4236f2
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      test/testime.c

+ 2 - 1
test/testime.c

@@ -196,7 +196,8 @@ static int unifont_init(const char *fontname)
         }
         }
 
 
 
 
-        if (bytesRead < (33 - bytesOverread)) {
+
+        if ((size_t)bytesRead < (33 - bytesOverread)) {
             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n");
             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n");
             return -1;
             return -1;
         }
         }