Skip to content

Commit

Permalink
Valid xml tokens
Browse files Browse the repository at this point in the history
Signed-off-by: peach280 <[email protected]>
  • Loading branch information
peach280 committed Jan 10, 2025
1 parent f42ea50 commit f2569f2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/lib_ccx/ccx_encoders_spupng.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,23 @@ void sanitize_and_write_comment(FILE *fpxml, const char *input_file)
int j = 0;
for (int i = 0; input_file[i] != '\0' && j < sizeof(sanitized_file) - 1; i++)
{
if (input_file[i] == '-')
if (input_file[i] == '-')
{
if (input_file[i + 1] == '-')
{
if (input_file[i + 1] == '-')
{
sanitized_file[j++] = ' ';
i++;
}
else
{
sanitized_file[j++] = input_file[i];
}
}
sanitized_file[j++] = ' ';
i++;
}
else
{
sanitized_file[j++] = input_file[i];
}
}
sanitized_file[j++] = input_file[i];
}
}
else
{
sanitized_file[j++] = input_file[i];
}
}
sanitized_file[j] = '\0';

fprintf(fpxml, "<!-- %s -->\n", sanitized_file);
Expand Down

0 comments on commit f2569f2

Please sign in to comment.