Commit 5c079d24 by Geoff Lang

Don't print assertion expression as a format string.

If the assert contained '%' symbols, it would be interpreted as a substituion. BUG=angleproject:1189 Change-Id: Ib347bc1a892397373e7318e032070c0337f110de Reviewed-on: https://chromium-review.googlesource.com/316410 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 4028159e
...@@ -105,7 +105,7 @@ bool DebugAnnotationsActive(); ...@@ -105,7 +105,7 @@ bool DebugAnnotationsActive();
#if !defined(NDEBUG) #if !defined(NDEBUG)
#define ASSERT(expression) { \ #define ASSERT(expression) { \
if(!(expression)) \ if(!(expression)) \
ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \ ERR("\t! Assert failed in %s(%d): %s\n", __FUNCTION__, __LINE__, #expression); \
assert(expression); \ assert(expression); \
} ANGLE_EMPTY_STATEMENT } ANGLE_EMPTY_STATEMENT
#define UNUSED_ASSERTION_VARIABLE(variable) #define UNUSED_ASSERTION_VARIABLE(variable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment