// As a special case for Arch Linux the strings "linux" and "linux-lts"
// are considered to be digits.
CHAR16 *FindNumbers(IN CHAR16 *InString) {
- UINTN i, StartOfElement = 0, EndOfElement = 0, CopyLength;
+ UINTN i, StartOfElement, EndOfElement = 0, CopyLength;
CHAR16 *Found = NULL;
if (InString == NULL)
return NULL;
+ StartOfElement = StrLen(InString);
+
// Find "linux-lts" or "linux"
Found = MyStrStr(InString, L"linux-lts");
if (Found != NULL) {