From 74338a353db76efd5fd890fc246c2751d306d477 Mon Sep 17 00:00:00 2001 From: rameel Date: Fri, 9 May 2025 17:10:17 +0500 Subject: [PATCH] Fix a typo in comments --- src/Ramstack.Parsing/Parser.Repeat.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ramstack.Parsing/Parser.Repeat.cs b/src/Ramstack.Parsing/Parser.Repeat.cs index 513beee..f5a322a 100644 --- a/src/Ramstack.Parsing/Parser.Repeat.cs +++ b/src/Ramstack.Parsing/Parser.Repeat.cs @@ -471,7 +471,7 @@ public override bool TryParse(ref ParseContext context, [NotNullWhen(true)] out // In other words, the check would happen anyway, but by placing it here explicitly, // we eliminate the need for exception code inside Slice itself. // - // Even though logically (uint)index < (uint)s.Length implies (uint)index <= (uint)s.Length, + // Even though logically (uint)index < (uint)s.Length implies (uint)index + 1 <= (uint)s.Length, // the JIT cannot currently prove this identity and therefore cannot optimize away // the redundant check in Slice. @@ -563,7 +563,7 @@ public override bool TryParse(ref ParseContext context, out Unit value) // In other words, the check would happen anyway, but by placing it here explicitly, // we eliminate the need for exception code inside Slice itself. // - // Even though logically (uint)index < (uint)s.Length implies (uint)index <= (uint)s.Length, + // Even though logically (uint)index < (uint)s.Length implies (uint)index + 1 <= (uint)s.Length, // the JIT cannot currently prove this identity and therefore cannot optimize away // the redundant check in Slice.