Skip to content

Commit f6e0b38

Browse files
authored
Merge pull request #1 from pl-str/fix/substring
Fix Substring() use issues for version of .Net prior to 6.0.
2 parents 70da94d + a4c7d89 commit f6e0b38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Solidsoft.Reply.Parsers.Gs1Ai/EntityResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4057,7 +4057,7 @@ private static ApplicationIdentifier GetEntity(this string data, int length) {
40574057
#if NET6_0_OR_GREATER
40584058
data[..length],
40594059
#else
4060-
data.Substring(length),
4060+
data.Substring(0, length),
40614061
#endif
40624062
true,
40634063
out ApplicationIdentifier applicationIdentifier)
@@ -4191,7 +4191,7 @@ private static bool IsNumberInRange(
41914191
#if NET6_0_OR_GREATER
41924192
data[startIndex..(length + startIndex)],
41934193
#else
4194-
data.Substring(startIndex, length + startIndex - 1),
4194+
data.Substring(startIndex, length),
41954195
#endif
41964196
out var number)
41974197
&& number.IsNumberInRange(lowerBound, upperBound);

0 commit comments

Comments
 (0)