diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index e4571e71a52..e876adfa58e 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -121,9 +121,12 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo } #if 0 /* ARG!. workaround for a bug in blenders use of vsnprintf */ - BKE_reportf(reports, RPT_ERROR, "%s\nlocation: %s:%d\n", cstring, filename, lineno); + BKE_reportf(reports, RPT_ERROR, "%s\nlocation: %s:%d\n", _PyUnicode_AsString(pystring), filename, lineno); #else - pystring_format = PyUnicode_FromFormat(TIP_("%s\nlocation: %s:%d\n"), cstring, filename, lineno); + pystring_format = PyUnicode_FromFormat( + TIP_("%s\nlocation: %s:%d\n"), + _PyUnicode_AsString(pystring), filename, lineno); + cstring = _PyUnicode_AsString(pystring_format); BKE_report(reports, RPT_ERROR, cstring); |