X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FTrack.java;h=63cd01faaf488028085a6712c5648ad9ffa8ea1d;hp=fc65959bd3c6f2c25442d4e3bd15a78d98842f60;hb=f1b92378a792131ac8fb33a869405851d5b2d1f7;hpb=649c5da6ee1bbc590699e11a92316ece2ea8512d diff --git a/tim/prune/data/Track.java b/tim/prune/data/Track.java index fc65959..63cd01f 100644 --- a/tim/prune/data/Track.java +++ b/tim/prune/data/Track.java @@ -489,7 +489,7 @@ public class Track { // TODO: Move cut/move into separate function? // Check that indices make sense - if (inSectionStart > 0 && inSectionEnd > inSectionStart && inMoveTo >= 0 + if (inSectionStart >= 0 && inSectionEnd > inSectionStart && inMoveTo >= 0 && (inMoveTo < inSectionStart || inMoveTo > (inSectionEnd+1))) { // do the cut and move