git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10914
6f19259b-4bc3-4df7-8a09-
765794883524
StrSize = AsciiStrSize (OptionalStrStart);\r
} while (OptionalStrStart[StrSize] != 0 && Index != 0);\r
\r
- if (Index != 0) {\r
+ if ((Index != 0) || (StrSize == 1)) {\r
+ //\r
+ // Meet the end of strings set but Index is non-zero, or\r
+ // Find an empty string\r
+ //\r
*String = GetStringById (STRING_TOKEN (STR_MISSING_STRING));\r
} else {\r
*String = AllocatePool (StrSize * sizeof (CHAR16));\r