From 374d1b5e7f5099d4c5cac4ea7d4ceb9d4d61832e Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 6 Dec 2016 17:32:06 +0000 Subject: [PATCH] Win32: simplify. Sanitization done by the removed code is already performed by CommandLineToArgvW. --- src/platform/w32main.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/platform/w32main.cpp b/src/platform/w32main.cpp index 25849d6..065dc95 100644 --- a/src/platform/w32main.cpp +++ b/src/platform/w32main.cpp @@ -1485,12 +1485,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, // A filename may have been specified on the command line; if so, then // strip any quotation marks, and make it absolute. if(args.size() >= 2) { - std::string filename = args[1]; - if(filename[0] == '\"' && filename[filename.length() - 1] == '\"') { - filename.erase(0, 1); - filename.erase(filename.length() - 1, 1); - } - SS.OpenFile(PathFromCurrentDirectory(filename)); + SS.OpenFile(PathFromCurrentDirectory(args[1])); } // Repaint one more time, after we've set everything up.