Fixed a bug where gap filler overrode existing values

This commit is contained in:
Rsl1122 2019-09-28 10:43:24 +03:00
parent 6fe5451a83
commit d2581df3f6

View File

@ -62,7 +62,7 @@ public class MutatorFunctions {
private static void addMissing(long from, long to, NavigableMap<Long, Integer> points, long accuracy, Integer replacement) {
long iterate = from;
while (iterate < to) {
points.put(iterate, replacement);
points.putIfAbsent(iterate, replacement);
iterate += accuracy;
}
}