diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go index 74b8873d10..2e2fdc6955 100644 --- a/whisper/whisperv6/api.go +++ b/whisper/whisperv6/api.go @@ -560,7 +560,7 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) { if len(req.Topics) > 0 { topics = make([][]byte, len(req.Topics)) for i, topic := range req.Topics { - topics = append(topics, make([]byte, 0, len(topic))) + topics[i] = make([]byte, 0, len(topic)) copy(topics[i], topic[:]) } }