summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-04-24 15:57:43 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-04-24 16:53:47 +0200
commit49601752b3bf5315db1edb8426381767325613d9 (patch)
tree6b1e5b9df7686f2a923ae03118267548eb270ed3 /tool
parenta8f8fa5b87f39a4b179afe45778d6e35184ae2e2 (diff)
tool: Fix dumping of unknown MPIs.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/commands/dump.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index 346e94e6..b6849d85 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -752,7 +752,10 @@ impl PacketDumper {
fn dump_mpis(&self, output: &mut io::Write, i: &str,
chunks: &[&[u8]], keys: &[&str]) -> Result<()> {
assert_eq!(chunks.len(), keys.len());
- assert!(chunks.len() > 0);
+ if chunks.len() == 0 {
+ return Ok(());
+ }
+
let max_key_len = keys.iter().map(|k| k.len()).max().unwrap();
for (chunk, key) in chunks.iter().zip(keys.iter()) {