[HotFix][RegistryPreview]Fix out of bonds array access error (#28803)

This commit is contained in:
Jaime Bernardo
2023-09-27 16:35:59 +01:00
committed by GitHub
parent 1f86eefed1
commit 59fb08cdd8

View File

@@ -445,7 +445,7 @@ namespace RegistryPreview
i++;
}
if (value[i - 1] != '\\' && value[i] == '"')
if (i < value.Length && value[i - 1] != '\\' && value[i] == '"')
{
// Don't allow non-escaped quotes
registryValue.Type = "ERROR";