aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv6/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisperv6/api.go')
-rw-r--r--whisper/whisperv6/api.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go
index 96e2b17e7..3f3a082af 100644
--- a/whisper/whisperv6/api.go
+++ b/whisper/whisperv6/api.go
@@ -558,9 +558,10 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) {
}
if len(req.Topics) > 0 {
- topics = make([][]byte, 0, len(req.Topics))
- for _, topic := range req.Topics {
- topics = append(topics, topic[:])
+ topics = make([][]byte, len(req.Topics))
+ for i, topic := range req.Topics {
+ topics[i] = make([]byte, TopicLength)
+ copy(topics[i], topic[:])
}
}