Fix a null access due to assigning nil to the member memberships map
Even though the memberships map has type map[string]*memberships (with memberships being defined as []membership), the default value for that map should not be `nil` but a pointer to a nil slice. This fixes a segfault on some servers before user channel prefixes are sent. git-svn-id: file:///srv/svn/repo/suika/trunk@294 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
parent
db16c9dde3
commit
087d9b5493
@ -692,7 +692,7 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ch.Members[msg.Prefix.Name] = nil
|
||||
ch.Members[msg.Prefix.Name] = &memberships{}
|
||||
}
|
||||
|
||||
chMsg := msg.Copy()
|
||||
|
Loading…
x
Reference in New Issue
Block a user