aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-25 17:08:52 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-25 17:08:52 +0100
commit10f2231bcf72c65389546c999e1d74968c482134 (patch)
tree5528aea58aa76a89a97f6dd1fe50e849dfc6416b /src/eu/siacs/conversations/entities
parent2ab757d6a27ac713949b49de38da53f3d5ef7bfa (diff)
fixed array out of bounds
Diffstat (limited to 'src/eu/siacs/conversations/entities')
-rw-r--r--src/eu/siacs/conversations/entities/MucOptions.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java
index 4ed83a5a..e429a5ab 100644
--- a/src/eu/siacs/conversations/entities/MucOptions.java
+++ b/src/eu/siacs/conversations/entities/MucOptions.java
@@ -101,7 +101,9 @@ public class MucOptions {
}
public void processPacket(PresencePacket packet) {
- String name = packet.getAttribute("from").split("/")[1];
+ String[] fromParts = packet.getFrom().split("/");
+ if (fromParts.length>=2) {
+ String name = fromParts[1];
String type = packet.getAttribute("type");
if (type==null) {
User user = new User();
@@ -143,6 +145,7 @@ public class MucOptions {
}
}
}
+ }
}
public List<User> getUsers() {