3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 05:49:25 +01:00

fix array overrun panic bug, #13

This commit is contained in:
Edmund Huber 2015-06-06 18:26:28 -07:00
parent 89bdb8a321
commit 02dca1dd89

View File

@ -327,6 +327,9 @@ func ParseJoinCommand(args []string) (Command, error) {
keys := make([]string, len(channels))
if len(args) > 1 {
for i, key := range strings.Split(args[1], ",") {
if i >= len(channels) {
break
}
keys[i] = key
}
}