From 60f8fc293d50abcba08c2d263a004ff7bde32283 Mon Sep 17 00:00:00 2001 From: QuadDamage <70681639+quaddamage1@users.noreply.github.com> Date: Mon, 7 Sep 2020 15:20:35 -0700 Subject: [PATCH] VFS: fix off-by-one error in vfs::escape() --- rpcs3/Emu/VFS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/VFS.cpp b/rpcs3/Emu/VFS.cpp index a56cbee6d8..3d4adaef44 100644 --- a/rpcs3/Emu/VFS.cpp +++ b/rpcs3/Emu/VFS.cpp @@ -320,7 +320,7 @@ std::string vfs::escape(std::string_view name, bool escape_slash) case "COM"_u32: case "LPT"_u32: { - if (name.size() >= 4 && name[3] >= '1' && name[4] <= '9') + if (name.size() >= 4 && name[3] >= '1' && name[3] <= '9') { if (name.size() == 4 || name[4] == '.') {