diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index 7fd1d573a5e7..bd8ab8f90795 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -1946,6 +1946,8 @@ internal static bool StringEquals (IntPtr utf8, string? str) } if (b != (short) str [i]) return false; + if (b == 0) + return false; } return c [str.Length] == 0; }