From ef91273ca334b8bc13e0c906e709e6070f5043fb Mon Sep 17 00:00:00 2001 From: bnnm Date: Sat, 23 Nov 2024 16:01:03 +0100 Subject: [PATCH] CLI: fix infinite loop with non-ascii filenames --- cli/vgmstream_cli_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/vgmstream_cli_utils.c b/cli/vgmstream_cli_utils.c index 7f1954ab..30a68c8e 100644 --- a/cli/vgmstream_cli_utils.c +++ b/cli/vgmstream_cli_utils.c @@ -79,7 +79,8 @@ void replace_filename(char* dst, size_t dstsize, cli_config_t* cfg, VGMSTREAM* v } else { /* not recognized */ - continue; + // TO-DO should move buf or swap "?" with "_"? may happen with non-ascii on Windows; for now break to avoid infinite loops + break; } /* copy result to buf again, so it can be used as format in next replace