shithub: rgbds

Download patch

ref: 0778959e986928a08d55729626e200fcbefa2569
parent: 76331d1c4aa0c5b71b17a4a6471d54dd48bc5604
author: ISSOtm <eldredhabert0@gmail.com>
date: Mon Aug 31 17:26:21 EDT 2020

Remove arbitrary limits on charmap

They were made irrelevant when switching to a trie

--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -1094,7 +1094,7 @@
 				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));
 		}
 ;
 
--- a/src/asm/charmap.c
+++ b/src/asm/charmap.c
@@ -144,9 +144,6 @@
 	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++) {