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)
This commit is contained in:
@@ -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, ...)
|
||||
|
||||
Reference in New Issue
Block a user