summaryrefslogtreecommitdiff
path: root/tools/file2include.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-05-07 23:00:22 +0200
committerTom Rini <trini@konsulko.com>2018-05-10 20:38:34 -0400
commitb14619ba62dd55f581784f3e7d6416c92d831258 (patch)
tree4fc75d7dc4d59ea07f30b93e1866781828ee8ea8 /tools/file2include.c
parent4a8e72954e11f2c2c37ee138b88a1d9362dba4da (diff)
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>
Diffstat (limited to 'tools/file2include.c')
-rw-r--r--tools/file2include.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/file2include.c b/tools/file2include.c
index e602f937f1..b98af30a72 100644
--- a/tools/file2include.c
+++ b/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(".");