From 489a219888a330009e83db5ce3cc623bd88bf5ca Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Wed, 1 Sep 2021 15:56:58 -0400 Subject: [PATCH] Bugfix for character remapping in filename - as.c: Use widechar string and comparison for reserved characters. Signed-off-by: Selva Nair --- as.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/as.c b/as.c index ae0276b..eaa3bfa 100644 --- a/as.c +++ b/as.c @@ -88,10 +88,10 @@ ExtractProfileName(const WCHAR *profile, const WCHAR *default_name, WCHAR *out_n out_name[out_name_length - 1] = L'\0'; /* sanitize profile name */ - const char *reserved = "<>:\"/\\|?*;"; /* remap these and ascii 1 to 31 */ + const WCHAR *reserved = L"<>:\"/\\|?*;"; /* remap these and ascii 1 to 31 */ while (*out_name) { wchar_t c = *out_name; - if (c < 32 || strchr(reserved, c)) + if (c < 32 || wcschr(reserved, c)) *out_name = L'_'; ++out_name; }