From c424a9bf5aef77a26f59e6b15dec8c00e43f28f0 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 9 Feb 2020 22:15:43 +0100 Subject: [PATCH] Only output a single error with charmaps --- src/asm/asmy.y | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/asm/asmy.y b/src/asm/asmy.y index d5c5ea96..862ebcaf 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -1004,10 +1004,8 @@ charmap : T_POP_CHARMAP string comma const if ((value & 0xFF) != value) warning(WARNING_TRUNCATION, "Expression must be 8-bit"); - if (charmap_Add($2, value & 0xFF) == -1) { - fprintf(stderr, "Error parsing charmap. Either you've added too many (%i), or the input character length is too long (%i)' : %s\n", MAXCHARMAPS, CHARMAPLENGTH, strerror(errno)); - yyerror("Error parsing charmap."); - } + if (charmap_Add($2, value & 0xFF) == -1) + yyerror("Error parsing charmap. Either you've added too many (%i), or the input character length is too long (%i)' : %s\n", MAXCHARMAPS, CHARMAPLENGTH, strerror(errno)); } ;