OcStringLib: Fix a typo
@@ -162,6 +162,9 @@ OcStrStrLength (
return NULL;
}
+ if (SearchStringLength > 1) {
+ Index = 0;
+
Y = (CONST CHAR16 *) String;
X = (CONST CHAR16 *) SearchString;
@@ -173,7 +176,6 @@ OcStrStrLength (
Index3 = 2;
}
- if (SearchStringLength > 1) {
while (Index <= StringLength - SearchStringLength) {
if (X[1] != Y[Index+1]) {
Index += Index2;
