From 5eadb80f09b246f6934468535dfcaedaccd59c0c Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Thu, 21 Aug 2014 22:13:08 +0000 Subject: ShellPkg: leave quotes around params Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15875 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ShellParametersProtocol.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ShellPkg') diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c index 9d769541c6..75704b4ae0 100644 --- a/ShellPkg/Application/Shell/ShellParametersProtocol.c +++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c @@ -85,7 +85,11 @@ GetNextParameter( StrCpy(*TempParameter, L""); *Walker = NextDelim + 1; } else if (NextDelim != NULL) { - StrnCpy(*TempParameter, (*Walker)+1, NextDelim - ((*Walker)+1)); + + // + // Copy ensuring that both quotes are left in place. + // + StrnCpy(*TempParameter, (*Walker), NextDelim - *Walker + 1); *Walker = NextDelim + 1; } else { // -- cgit v1.2.3