From 06ea7b20bfe2961ef766985b9b61e1d062eb4264 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 17 May 2021 12:24:37 +0200 Subject: [PATCH] Reinstate "empty filename" assertion in `__FILE__` callback This assertion was mentioned by a comment, but deleted for some reason. --- src/asm/symbol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/asm/symbol.c b/src/asm/symbol.c index 1c70b04e..2d6005b1 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -96,6 +96,7 @@ static char const *Callback__FILE__(void) 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 */