shithub: rgbds

Download patch

ref: 06ea7b20bfe2961ef766985b9b61e1d062eb4264
parent: a3c4652bfd5f040e4bf2b3b27a5779546f8dc8e8
author: ISSOtm <[email protected]>
date: Mon May 17 08:24:37 EDT 2021

Reinstate "empty filename" assertion in `__FILE__` callback

This assertion was mentioned by a comment, but deleted for some reason.

--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -96,6 +96,7 @@
 	char const *fileName = fstk_GetFileName();
 	size_t j = 1;
 
+	assert(fileName[0]);
 	/* The assertion above ensures the loop runs at least once */
 	for (size_t i = 0; fileName[i]; i++, j++) {
 		/* Account for the extra backslash inserted below */