From 0778959e986928a08d55729626e200fcbefa2569 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 31 Aug 2020 21:26:21 +0200 Subject: [PATCH] Remove arbitrary limits on charmap They were made irrelevant when switching to a trie --- src/asm/asmy.y | 2 +- src/asm/charmap.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/asm/asmy.y b/src/asm/asmy.y index 4b687f38..8cb98574 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -1094,7 +1094,7 @@ charmap : T_POP_CHARMAP string ',' const { warning(WARNING_TRUNCATION, "Expression must be 8-bit"); if (charmap_Add($2, $4 & 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)); + yyerror("Error adding new charmap mapping: %s\n", strerror(errno)); } ; diff --git a/src/asm/charmap.c b/src/asm/charmap.c index 31b82cc6..d30f7380 100644 --- a/src/asm/charmap.c +++ b/src/asm/charmap.c @@ -144,9 +144,6 @@ int32_t charmap_Add(char *input, uint8_t output) struct Charmap *charmap = currentCharmap; struct Charnode *curr_node, *temp_node; - if (charmap->charCount >= MAXCHARMAPS || strlen(input) > CHARMAPLENGTH) - return -1; - curr_node = &charmap->nodes[0]; for (i = 0; (v = (uint8_t)input[i]); i++) {