Parcourir la source

another fix for an illegal initialisation struct

ceriel il y a 37 ans
Parent
commit
7dfa108a92
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      util/topgen/topgen.g

+ 3 - 3
util/topgen/topgen.g

@@ -285,11 +285,11 @@ replacement (int *n;)
 	|		/* empty replacement, but there must be a
 			 * structure initializer anyway
 			 */
-			{   fputs("\t{\"\"",genc);
+			{   fputs("\t{\"\", {",genc);
 			    for (i = 0; i < maxoperand; i++) {
-				fputs(",{\"\",-1,\"\"}",genc);
+				fprintf(genc, "%c{\"\",-1,\"\"}",i?',':' ');
 			    }
-			    putc('}',genc);
+			    fputs("}}",genc);
 			}
 	]
 ;