Reinstate "empty filename" assertion in __FILE__ callback

This assertion was mentioned by a comment, but deleted for some reason.
This commit is contained in:
ISSOtm
2021-05-17 12:24:37 +02:00
committed by Rangi
parent a3c4652bfd
commit 06ea7b20bf

View File

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