From f044db166b890bf6a749a95778182addd6df2a03 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 9 Nov 2012 20:46:07 +0100 Subject: [PATCH] Fix Actionfrequency.fromLine [need to add test cases]. --- src/fr/neatmonster/nocheatplus/utilities/ActionFrequency.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fr/neatmonster/nocheatplus/utilities/ActionFrequency.java b/src/fr/neatmonster/nocheatplus/utilities/ActionFrequency.java index 04b62401..ba830461 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/ActionFrequency.java +++ b/src/fr/neatmonster/nocheatplus/utilities/ActionFrequency.java @@ -199,7 +199,7 @@ public class ActionFrequency { final long durBucket = Long.parseLong(split[1]); final long time = Long.parseLong(split[2]); final float[] buckets = new float[split.length -3]; - if (split.length != buckets.length) throw new RuntimeException("Bad argument length."); // TODO + if (split.length - 3 != buckets.length) throw new RuntimeException("Bad argument length."); // TODO for (int i = 3; i < split.length; i ++){ buckets[i - 3] = Float.parseFloat(split[i]); }