mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-29 15:40:02 +01:00
Merge pull request #15 from edmund-huber/edmund-fixes-13
fix array overrun panic bug, #13
This commit is contained in:
commit
ed7c5a795f
@ -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…
Reference in New Issue
Block a user