From: James Bunton Date: Mon, 13 Mar 2017 21:30:36 +0000 (+1100) Subject: Properly initialise variable to fix detection of non-Arch kernel versions X-Git-Url: https://code.delx.au/refind/commitdiff_plain/bd8da9d1244529797958d9592b8f13e3190da972 Properly initialise variable to fix detection of non-Arch kernel versions --- diff --git a/refind/mystrings.c b/refind/mystrings.c index 539aba2..eeb6560 100644 --- a/refind/mystrings.c +++ b/refind/mystrings.c @@ -241,12 +241,14 @@ BOOLEAN LimitStringLength(CHAR16 *TheString, UINTN Limit) { // 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) {