From 56cdd4b9a88dad720c33ad97961cd0541f8bc468 Mon Sep 17 00:00:00 2001 From: jprocter Date: Sun, 14 Nov 2010 14:55:20 +0000 Subject: [PATCH] zero length operations are valid --- src/jalview/datamodel/CigarBase.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jalview/datamodel/CigarBase.java b/src/jalview/datamodel/CigarBase.java index 2508717..d351603 100644 --- a/src/jalview/datamodel/CigarBase.java +++ b/src/jalview/datamodel/CigarBase.java @@ -268,10 +268,14 @@ public abstract class CigarBase { throw new Error("Implementation error. Invalid operation string."); } - if (range <= 0) + if (range==0) + { + return; // No Operation to add. + } + if (range < 0) { throw new Error( - "Invalid range string (must be non-zero positive number)"); + "Invalid range string (must be zero or positive number)"); } int lngth = 0; if (operation == null) -- 1.7.10.2