shithub: rgbds

Download patch

ref: b224cab3e052e79ee8628ed896d4350765e1b75d
parent: 7381d7b92fa21cce3c086cb01199036053687078
author: ISSOtm <[email protected]>
date: Sat Aug 22 22:32:33 EDT 2020

Harmonize printing `distance`

--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -509,7 +509,7 @@
 static void reallocCaptureBuf(void)
 {
 	if (lexerState->captureCapacity == SIZE_MAX)
-		fatalerror("Cannot grow capture buffer past %zu bytes", SIZE_MAX);
+		fatalerror("Cannot grow capture buffer past %zu bytes\n", SIZE_MAX);
 	else if (lexerState->captureCapacity > SIZE_MAX / 2)
 		lexerState->captureCapacity = SIZE_MAX;
 	else
@@ -669,8 +669,8 @@
 static int peekInternal(uint8_t distance)
 {
 	if (distance >= LEXER_BUF_SIZE)
-		fatalerror("Internal lexer error: buffer has insufficient size for peeking (%u >= %u)\n",
-			   distance, LEXER_BUF_SIZE);
+		fatalerror("Internal lexer error: buffer has insufficient size for peeking (%"
+			   PRIu8 " >= %u)\n", distance, LEXER_BUF_SIZE);
 
 	size_t ofs = lexerState->expansionOfs + distance;
 	struct Expansion const *expansion = getExpansionAtDistance(&ofs);