2
0
Эх сурвалжийг харах

fix STBI_NO_HDR and STBI_NO_LINEAR to compile correctly even if you don't #include <math.h>

Sean Barrett 7 жил өмнө
parent
commit
602e986824
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      stb_image.h

+ 2 - 2
stb_image.h

@@ -511,8 +511,8 @@ STBIDEF int   stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch
 #include <string.h>
 #include <limits.h>
 
-#if !defined(STBI_NO_LINEAR) && !defined(STBI_NO_HDR)
-#include <math.h>  // ldexp
+#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR)
+#include <math.h>  // ldexp, pow
 #endif
 
 #ifndef STBI_NO_STDIO