Francois Gouget : notepad: Improve handling of quoted filenames.
Alexandre Julliard
julliard at winehq.org
Tue Jun 10 13:35:20 CDT 2008
Module: wine
Branch: master
Commit: 5bc7b784cbcf386a99f96238a0f488eb0eb9b4ed
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5bc7b784cbcf386a99f96238a0f488eb0eb9b4ed
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Jun 10 10:20:19 2008 +0200
notepad: Improve handling of quoted filenames.
---
programs/notepad/main.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/programs/notepad/main.c b/programs/notepad/main.c
index fb84487..f231f20 100644
--- a/programs/notepad/main.c
+++ b/programs/notepad/main.c
@@ -571,8 +571,13 @@ static void HandleCommandLine(LPWSTR cmdline)
if (cmdline[0] == '"')
{
+ WCHAR* wc;
cmdline++;
- cmdline[lstrlen(cmdline) - 1] = 0;
+ wc=cmdline;
+ /* Note: Double-quotes are not allowed in Windows filenames */
+ while (*wc && *wc != '"') wc++;
+ /* On Windows notepad ignores further arguments too */
+ *wc = 0;
}
if (FileExists(cmdline))
More information about the wine-cvs
mailing list