Explorar el Código

fix: 调整free宏

在MSVC上原free宏无法使用
SongZihuan hace 3 años
padre
commit
c1f6c16c20
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      main.h

+ 1 - 1
main.h

@@ -29,7 +29,7 @@ static void *s_calloc(size_t n, size_t s) {
    return new;
 }
 
-#define free(p) (((p) != NULL ? free(p) : NULL), ((p) = NULL))
+#define free(p) (((p) != NULL ? (free(p), NULL) : NULL), ((p) = NULL))
 #define calloc(n, s) (s_calloc(n, s))
 
 struct MD5_CTX {