From: amwaterhouse Date: Thu, 26 Oct 2006 12:17:13 +0000 (+0000) Subject: Sequence length maybe less than end X-Git-Tag: Release_2_2~218 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0c40653e5033e68c8d87955ea9f96879c8114b62;p=jalview.git Sequence length maybe less than end --- diff --git a/src/jalview/commands/ChangeCaseCommand.java b/src/jalview/commands/ChangeCaseCommand.java index ad5c937..49faa50 100644 --- a/src/jalview/commands/ChangeCaseCommand.java +++ b/src/jalview/commands/ChangeCaseCommand.java @@ -69,14 +69,15 @@ public class ChangeCaseCommand implements CommandI for (int r = 0; r < regions.length; r++) { start = regions[r][0]; - end = regions[r][1]; for (int s = 0; s < seqs.length; s++) { sequence = seqs[s].getSequence(); StringBuffer newSeq = new StringBuffer(); - if (end > sequence.length()) + if (regions[r][1] > sequence.length()) end = sequence.length(); + else + end = regions[r][1]; if (start > 0) {