From 94f3a97fc230e7cc8581d6dbd8d15aef9c094805 Mon Sep 17 00:00:00 2001 From: Ivan Abarca Date: Mon, 25 Jul 2016 17:22:18 -0400 Subject: [PATCH] Fix potential invalid tick generation on VDMs --- src/main/java/vdm/VDMGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/vdm/VDMGenerator.java b/src/main/java/vdm/VDMGenerator.java index 92dc019d..2956a858 100644 --- a/src/main/java/vdm/VDMGenerator.java +++ b/src/main/java/vdm/VDMGenerator.java @@ -72,7 +72,7 @@ public List generate() throws IOException { + "\"")); } else { lines.add(segment(count++, "SkipAhead", "skip", "starttick \"" + (previousEndTick + 1) - + "\"", "skiptotick \"" + (tick.getStart() - 500) + "\"")); + + "\"", "skiptotick \"" + Math.max(0, tick.getStart() - 500) + "\"")); } String command = "startrecording"; if (tick.getType().equals(Tick.EXEC_RECORD_SEGMENT)) {