Update stb_image_write.h

Fixed case when  `__STDC_LIB_EXT1__ ` is not defined - for Linux, etc. According to the C99 standart @syoyo
This commit is contained in:
rhiskey 2023-12-05 00:15:50 +03:00 committed by GitHub
parent 8acf861db7
commit 77238cf23c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -773,7 +773,7 @@ static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, f
#ifdef __STDC_LIB_EXT1__ #ifdef __STDC_LIB_EXT1__
len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
#else #else
len = sprintf_s(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); len = snprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
#endif #endif
s->func(s->context, buffer, len); s->func(s->context, buffer, len);