From fbdff29c7ebfaa340e0dcf731ca03be2d0a8288a Mon Sep 17 00:00:00 2001 From: Andrew Wiggin Date: Thu, 1 Dec 2011 18:38:03 +0000 Subject: [PATCH] Fix for RNA_warning crashing on MSVC release builds MSVC is not C99-compliant, but with the macro as it was, the "args" part was consuming and dropping one of the params, so the format string wanted N extra args, and there were only N-1... boom, crash! Without "args" this works correctly (checked on MSVC10 release build) --- source/blender/makesrna/RNA_access.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 35549b613ea..b8c0568d3d7 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -996,7 +996,7 @@ StructRNA *ID_code_to_RNA_type(short idcode); #ifdef __GNUC__ # define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args) #else -# define RNA_warning(format, args, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__) +# define RNA_warning(format, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__) #endif void _RNA_warning(const char *format, ...)