Modified nhassert_failed to call impossoible.
This commit is contained in:
@@ -486,18 +486,11 @@ char *buf;
|
|||||||
/* nhassert_failed is called when an nhassert's condition is false */
|
/* nhassert_failed is called when an nhassert's condition is false */
|
||||||
void nhassert_failed(const char * exp, const char * file, int line)
|
void nhassert_failed(const char * exp, const char * file, int line)
|
||||||
{
|
{
|
||||||
char message[128];
|
char message[BUFSZ];
|
||||||
_snprintf(message, sizeof(message),
|
snprintf(message, sizeof(message),
|
||||||
"NHASSERT(%s) in '%s' at line %d\n", exp, file, line);
|
"NHASSERT(%s) in '%s' at line %d", exp, file, line);
|
||||||
|
|
||||||
if (IsDebuggerPresent()) {
|
impossible(message);
|
||||||
OutputDebugStringA(message);
|
|
||||||
DebugBreak();
|
|
||||||
}
|
|
||||||
|
|
||||||
// strip off the newline
|
|
||||||
message[strlen(message) - 1] = '\0';
|
|
||||||
error(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user