Remove illegal fat32 chars in badge dump

This commit is contained in:
2024-06-17 14:10:14 -04:00
parent 7182fd9078
commit 11113bbc07
4 changed files with 16 additions and 1 deletions

View File

@@ -26,6 +26,17 @@
#include "unicode.h"
void replace_chars(u16 *input, char *remove, u16 with)
{
for (u16 *cursor = input; *cursor != '\0'; cursor++)
{
if (strchr(remove, (char) (*cursor & 0xFF)))
{
*cursor = with;
}
}
}
size_t strulen(const u16 * input, ssize_t max_len)
{
for (int i = 0; i < max_len; i++) if (input[i] == 0) return i;