From 9f257e0b33fb2e23a051b0527c1ea0cd3a2d31b1 Mon Sep 17 00:00:00 2001 From: Serg Stetsuk Date: Fri, 3 Mar 2017 16:41:29 +0200 Subject: [PATCH] .errdef/.errndef with or without custom message GetErrText is not usable 'cause it overwrites StringBufferEnd. So we must append text to StringBufferEnd. Not all checks as in GetErrText are performed. So we have side effect: message can be in angle braces or in quotes too. Fixes #184. --- condasm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/condasm.c b/condasm.c index 446c192..daca317 100644 --- a/condasm.c +++ b/condasm.c @@ -552,6 +552,10 @@ ret_code ErrorDirective( int i, struct asm_tok tokenarray[] ) sym = NULL; /* Masm "usually" ignores the optional errtxt! */ + if( erridx ) { + strcat( StringBufferEnd, " : " ); + strcat( StringBufferEnd, tokenarray[erridx].string_ptr ); + } if( direct == T_DOT_ERRDEF && sym != NULL ) EmitErr( FORCED_DEF, StringBufferEnd ); else if( direct == T_DOT_ERRNDEF && sym == NULL )