]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.c
ShellPkg: Skip leading tabs when processing command line and scripts
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel1CommandsLib / UefiShellLevel1CommandsLib.c
index 6f67f49aea144ce11585e778f7a2dea59036ad96..5dca0629dbebef0d9e3362d1e3e15e4f6262bbab 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for NULL named library for level 1 shell command functions.\r
 \r
+  Copyright (c) 2013, Hewlett-Packard Development Company, L.P.\r
   Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -150,7 +151,11 @@ TestNodeForMove (
   }\r
 \r
   CommandNameWalker = CommandName;\r
-  while(CommandNameWalker[0] == L' ') {\r
+\r
+  //\r
+  // Skip leading spaces and tabs.\r
+  //\r
+  while ((CommandNameWalker[0] == L' ') || (CommandNameWalker[0] == L'\t')) {\r
     CommandNameWalker++;\r
   }\r
   TempLocation  = StrStr(CommandNameWalker, L" ");\r