Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _CRT_SECURE_NO_WARNINGS deprecation notice when compiling with msvc #1618

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion stb_image_write.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
Aarni Koskela - allow choosing PNG filter

bugfixes:
github:birds3345
github:Chribba
Guillaume Chereau
github:jry2
Expand Down Expand Up @@ -770,7 +771,7 @@ static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, f
char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
s->func(s->context, header, sizeof(header)-1);

#ifdef __STDC_LIB_EXT1__
#if defined(__STDC_LIB_EXT1__) || defined(_MSC_VER) && _MSC_VER >= 1400
len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
#else
len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
Expand Down