From e4d1f5c4121a1833a6a9ae347e25ab5b91aa1a95 Mon Sep 17 00:00:00 2001 From: tzarchat Date: Sat, 10 Sep 2022 19:55:42 +0200 Subject: [PATCH] fix(vdf): support for windows 125x encoding. --- src/physfs_archiver_vdf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/physfs_archiver_vdf.c b/src/physfs_archiver_vdf.c index 6d3a23f..8fd98d6 100644 --- a/src/physfs_archiver_vdf.c +++ b/src/physfs_archiver_vdf.c @@ -71,12 +71,7 @@ static int vdfLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, name[VDF_ENTRY_NAME_LENGTH] = '\0'; /* always null-terminated. */ for (namei = VDF_ENTRY_NAME_LENGTH - 1; namei >= 0; namei--) { - /* We assume the filenames are low-ASCII; consider the archive - corrupt if we see something above 127, since we don't know the - encoding. (We can change this later if we find out these exist - and are intended to be, say, latin-1 or UTF-8 encoding). */ - BAIL_IF(((PHYSFS_uint8) name[namei]) > 127, PHYSFS_ERR_CORRUPT, 0); - + /* VDFS filenames uses Windows-125x encoding, which depends of the region. */ if (name[namei] == ' ') name[namei] = '\0'; else