Browse Source

SDL_realloc() with size 0 now always defaults to size 1

Petar Popovic 7 months ago
parent
commit
257385277d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/stdlib/SDL_malloc.c

+ 1 - 1
src/stdlib/SDL_malloc.c

@@ -6461,7 +6461,7 @@ void *SDL_realloc(void *ptr, size_t size)
 {
     void *mem;
 
-    if (!ptr && !size) {
+    if (!size) {
         size = 1;
     }