mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 11:59:40 +01:00
fix array overrun panic bug, #13
This commit is contained in:
parent
89bdb8a321
commit
02dca1dd89
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user