From 7794de5e5e5976aba3c63c08bf885e14d57b4e8d Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Sat, 1 Jun 2024 13:11:19 +0200 Subject: [PATCH] GRAPHICS: OPENGL: Allow sscanf_s for GLAD It is properly guarded so it won't bring any portability problem and the file is autogenerated so this avoids to patch the file. --- graphics/opengl/context.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graphics/opengl/context.cpp b/graphics/opengl/context.cpp index 75cf55038e4..16b100e4f82 100644 --- a/graphics/opengl/context.cpp +++ b/graphics/opengl/context.cpp @@ -20,6 +20,12 @@ */ #define GLAD_GL_IMPLEMENTATION +// sscanf_s is used by glad on MSVC only +// we can't know before c=config.h is loaded that GLAD will be used +// but at this time it will be too late to allow sscanf_s +#ifdef _MSC_VER +#define FORBIDDEN_SYMBOL_EXCEPTION_sscanf_s +#endif #include "graphics/opengl/context.h"