.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.
This commit is contained in:
Serg Stetsuk 2017-03-03 16:41:29 +02:00 committed by Ilya V. Matveychikov
parent 4d3b8e80f4
commit 9f257e0b33

View File

@ -552,6 +552,10 @@ ret_code ErrorDirective( int i, struct asm_tok tokenarray[] )
sym = NULL; sym = NULL;
/* Masm "usually" ignores the optional errtxt! */ /* Masm "usually" ignores the optional errtxt! */
if( erridx ) {
strcat( StringBufferEnd, " : " );
strcat( StringBufferEnd, tokenarray[erridx].string_ptr );
}
if( direct == T_DOT_ERRDEF && sym != NULL ) if( direct == T_DOT_ERRDEF && sym != NULL )
EmitErr( FORCED_DEF, StringBufferEnd ); EmitErr( FORCED_DEF, StringBufferEnd );
else if( direct == T_DOT_ERRNDEF && sym == NULL ) else if( direct == T_DOT_ERRNDEF && sym == NULL )