Skip to content

Commit 70383f0

Browse files
committed
Fix bug in suffix
1 parent f975808 commit 70383f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Src/FastData.InternalShared/Helpers/TestHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public static GeneratorSpec Generate<TKey, TValue>(Func<string, ICodeGenerator>
171171
trimPrefix = strKeys[0].Substring(0, strProps.DeltaData.LeftZeroCount);
172172

173173
if (strProps.DeltaData.RightZeroCount > 0)
174-
trimSuffix = strKeys[0].Substring(strProps.DeltaData.RightZeroCount);
174+
trimSuffix = strKeys[0].Substring(strKeys[0].Length - strProps.DeltaData.RightZeroCount);
175175

176176
keys = (TKey[])(object)FastDataGenerator.SubStringKeys(strKeys, strProps);
177177
}

Src/FastData/FastDataGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private static string GenerateInternalString<TValue>(string[] keys, TValue[]? va
167167
trimPrefix = keys[0].Substring(0, strProps.DeltaData.LeftZeroCount);
168168

169169
if (strProps.DeltaData.RightZeroCount > 0)
170-
trimSuffix = keys[0].Substring(strProps.DeltaData.RightZeroCount);
170+
trimSuffix = keys[0].Substring(keys[0].Length - strProps.DeltaData.RightZeroCount);
171171

172172
keys = SubStringKeys(keys, strProps);
173173
}

0 commit comments

Comments
 (0)