Browse Source

tools/file2include: avoid incorrect comments

Avoid creating incorrect comments like /* ...*/... */ by printing
'.' instead of '*' inside comments.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt 6 years ago
parent
commit
b14619ba62
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/file2include.c

+ 1 - 1
tools/file2include.c

@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
 			printf("\\x%02x", buf[j]);
 		printf("\"}, /* ");
 		for (j = i; j < i + BLOCK_SIZE && j < count; ++j) {
-			if (buf[j] >= 0x20 && buf[j] <= 0x7e)
+			if (buf[j] != '*' && buf[j] >= 0x20 && buf[j] <= 0x7e)
 				printf("%c", buf[j]);
 			else
 				printf(".");