Fix off-by-one error in LocalizedDatasetPrototype (#28366)

This commit is contained in:
Tayrtahn
2024-05-28 23:37:03 -04:00
committed by GitHub
parent c53b5d422d
commit 7f9ed797af
2 changed files with 9 additions and 9 deletions

View File

@@ -47,9 +47,9 @@ public sealed partial class LocalizedDatasetValues : IReadOnlyList<string>
{
get
{
if (index > Count || index < 0)
if (index >= Count || index < 0)
throw new IndexOutOfRangeException();
return Prefix + index;
return Prefix + (index + 1);
}
}