mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
fix array overrun panic bug, #13
This commit is contained in:
parent
89bdb8a321
commit
02dca1dd89
1 changed files with 3 additions and 0 deletions
|
|
@ -327,6 +327,9 @@ func ParseJoinCommand(args []string) (Command, error) {
|
||||||
keys := make([]string, len(channels))
|
keys := make([]string, len(channels))
|
||||||
if len(args) > 1 {
|
if len(args) > 1 {
|
||||||
for i, key := range strings.Split(args[1], ",") {
|
for i, key := range strings.Split(args[1], ",") {
|
||||||
|
if i >= len(channels) {
|
||||||
|
break
|
||||||
|
}
|
||||||
keys[i] = key
|
keys[i] = key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue