summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-03-22 23:09:10 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-03-22 23:09:10 +0000
commitce87b04aaeba6ce9026b01142b4766458b0f7726 (patch)
tree081afd908b668a30ca96937943002df27a1e315a /src
parent97ba2ff9385ec58128fd3b1e22c8ece57f89020d (diff)
downloadbukkit-ce87b04aaeba6ce9026b01142b4766458b0f7726.tar
bukkit-ce87b04aaeba6ce9026b01142b4766458b0f7726.tar.gz
bukkit-ce87b04aaeba6ce9026b01142b4766458b0f7726.tar.lz
bukkit-ce87b04aaeba6ce9026b01142b4766458b0f7726.tar.xz
bukkit-ce87b04aaeba6ce9026b01142b4766458b0f7726.zip
Fixed an index out of range error in ChatColor.getLastColors
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/ChatColor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
index e1a6d937..6b3f35fb 100644
--- a/src/main/java/org/bukkit/ChatColor.java
+++ b/src/main/java/org/bukkit/ChatColor.java
@@ -222,7 +222,7 @@ public enum ChatColor {
int length = input.length();
while ((lastIndex = input.indexOf(COLOR_CHAR, lastIndex + 1)) != -1) {
- if (lastIndex != length) {
+ if (lastIndex < length - 1) {
char c = input.charAt(lastIndex + 1);
ChatColor col = getByChar(c);