summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/message.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/message.rs b/src/message.rs
index 2719341..2927295 100644
--- a/src/message.rs
+++ b/src/message.rs
@@ -64,7 +64,8 @@ impl RtMessage {
match num_tags {
0 => Ok(RtMessage::new(0)),
1 => RtMessage::single_tag_message(bytes, &mut msg),
- _ => RtMessage::multi_tag_message(num_tags, bytes, &mut msg),
+ 2 ... 1024 => RtMessage::multi_tag_message(num_tags, bytes, &mut msg),
+ _ => Err(Error::InvalidNumTags(num_tags)),
}
}