shithub: rgbds

Download patch

ref: ee9e45b3d45f0b6f4342159ec75179df503fdc29
parent: 5a65188ca94f2ebaa6ffabac4e7d04cb166de4d6
author: ISSOtm <[email protected]>
date: Tue Sep 29 05:06:58 EDT 2020

Change assertion condition in __FILE__ buf dumping

Removes a false positive from Clang static analysis

--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -103,7 +103,7 @@
 	size_t j = 1;
 
 	/* TODO: is there a way for a file name to be empty? */
-	assert(strlen(fileName) != 0);
+	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 */