From 9699a5080fe254b249f4e878d8dd0b3fd982e4d3 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Sat, 2 Aug 2008 20:54:45 +0000 Subject: [PATCH] Improve logging from assert when number of context variables don't match. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5748 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/script/evntsave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/script/evntsave.c b/lib/script/evntsave.c index 7a2b7a9b2..51336081a 100644 --- a/lib/script/evntsave.c +++ b/lib/script/evntsave.c @@ -260,8 +260,8 @@ static BOOL eventLoadContext(const SDWORD version, char *pBuffer, UDWORD *pSize, if (numVars != *((SWORD*)pPos)) { - debug( LOG_ERROR, "eventLoadContext: number of context variables does not match the script code" ); - abort(); + ASSERT(false, "Context %d of %d: Number of context variables (%d) does not match the script code (%d)", + context, numContext, numVars, *((SWORD*)pPos)); return false; } pPos += sizeof(SWORD);