Check standard error code return values as < 0 instead of == -1
This commit is contained in:
1 parent
46d9066a69
commit
037541a0e0
29 files changed
+59
-59
No files matched your search
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (i = 0; i < state->num_windows; i++) {
|
||||
if (SDL_SetWindowHitTest(state->windows[i], hitTest, NULL) == -1) {
|
||||
if (SDL_SetWindowHitTest(state->windows[i], hitTest, NULL) < 0) {
|
||||
SDL_Log("Enabling hit-testing failed for window %d: %s", i, SDL_GetError());
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
|
||||
Reference in new issue
Block a user