diff lwasm/list.c @ 553:3a173cefc814

Fix missing NULL guard found by gcc static analysis Fix a missing NULL guard in listing pass found with gcc analyzer.
author William Astle <lost@l-w.ca>
date Thu, 06 Jul 2023 12:06:22 -0600
parents f3018ed5e30e
children 6237505ee1dc
line wrap: on
line diff
--- a/lwasm/list.c	Fri Jun 30 09:40:17 2023 -0600
+++ b/lwasm/list.c	Thu Jul 06 12:06:22 2023 -0600
@@ -269,7 +269,7 @@
 
 		if (as -> tabwidth == 0)
 		{
-			fputs(cl -> ltext, of);
+			if (of) fputs(cl -> ltext, of);
 		}
 		else 
 		{