1.1 compat
authorjprocter <Jim Procter>
Fri, 17 Dec 2010 13:56:04 +0000 (13:56 +0000)
committerjprocter <Jim Procter>
Fri, 17 Dec 2010 13:56:04 +0000 (13:56 +0000)
src/jalview/datamodel/ColumnSelection.java

index 0bcbd5b..589c19b 100644 (file)
@@ -1181,9 +1181,16 @@ public class ColumnSelection
                 sq = sq + sb;\r
                 while ((diff = spos + offset - sq.length() - 1) > 0)\r
                 {\r
-                  sq = sq\r
-                          + ((diff >= sb.length()) ? sb.toString() : sb\r
-                                  .substring(0, diff));\r
+                  //sq = sq\r
+                  //        + ((diff >= sb.length()) ? sb.toString() : sb\r
+                  //                .substring(0, diff));\r
+                  if (diff>=sb.length()) {\r
+                    sq+=sb.toString();\r
+                  } else {\r
+                    char[] buf = new char[diff];\r
+                    sb.getChars(0, diff, buf, 0);\r
+                    sq+=buf.toString();\r
+                  }\r
                 }\r
               }\r
               sq += sb.toString();\r