diff options
Diffstat (limited to 'ShellPkg/Application/Shell')
-rw-r--r-- | ShellPkg/Application/Shell/ShellManParser.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/ShellManParser.c b/ShellPkg/Application/Shell/ShellManParser.c index f12775f865..6c1849199c 100644 --- a/ShellPkg/Application/Shell/ShellManParser.c +++ b/ShellPkg/Application/Shell/ShellManParser.c @@ -15,7 +15,26 @@ #include "Shell.h"
-CHAR16 EFIAPI InternalShellCharToUpper (IN CHAR16 Char);
+/**
+ Convert a Unicode character to upper case only if
+ it maps to a valid small-case ASCII character.
+
+ This internal function only deal with Unicode character
+ which maps to a valid small-case ASCII character, i.e.
+ L'a' to L'z'. For other Unicode character, the input character
+ is returned directly.
+
+ @param Char The character to convert.
+
+ @retval LowerCharacter If the Char is with range L'a' to L'z'.
+ @retval Unchanged Otherwise.
+
+**/
+CHAR16
+EFIAPI
+InternalShellCharToUpper (
+ IN CHAR16 Char
+ );
/**
Verifies that the filename has .MAN on the end.
@@ -630,7 +649,7 @@ ManFileFindTitleSection( // Do not pass any leading path information that may be present to IsTitleHeader().
//
Start = StrLen(Command);
- while (Start
+ while ((Start != 0)
&& (*(Command + Start - 1) != L'\\')
&& (*(Command + Start - 1) != L'/')
&& (*(Command + Start - 1) != L':')) {
|