From a4ca9e8e125bd9cbfde7abe66029793980c83139 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 17 Dec 2010 14:24:26 +0000 Subject: [PATCH] 1.1 compat --- src/jalview/datamodel/ColumnSelection.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/jalview/datamodel/ColumnSelection.java b/src/jalview/datamodel/ColumnSelection.java index 589c19b..3b46c47 100644 --- a/src/jalview/datamodel/ColumnSelection.java +++ b/src/jalview/datamodel/ColumnSelection.java @@ -1227,9 +1227,16 @@ public class ColumnSelection int diff = origseq.getLength() - sq.length(); while (diff > 0) { - sq = sq - + ((diff >= sb.length()) ? sb.toString() : sb - .substring(0, diff)); + //sq = sq + // + ((diff >= sb.length()) ? sb.toString() : sb + // .substring(0, diff)); + if (diff>=sb.length()) { + sq+=sb.toString(); + } else { + char[] buf = new char[diff]; + sb.getChars(0, diff, buf, 0); + sq+=buf.toString(); + } diff = origseq.getLength() - sq.length(); } } -- 1.7.10.2