From 3bc9e636d31b1846e51b58c7429914e640866f53 Mon Sep 17 00:00:00 2001 From: Sebastian K Date: Sat, 25 Nov 2023 20:26:16 +0100 Subject: [PATCH] fix @aaronleopold bug --- pdf/src/object/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf/src/object/types.rs b/pdf/src/object/types.rs index bc5b2a4..1967fbc 100644 --- a/pdf/src/object/types.rs +++ b/pdf/src/object/types.rs @@ -1054,7 +1054,7 @@ impl Object for NameTree { (None, Some(names)) => { let names = names.resolve(resolve)?.into_array()?; let mut new_names = Vec::new(); - for pair in names.chunks(2) { + for pair in names.chunks_exact(2) { let name = pair[0].clone().resolve(resolve)?.into_string()?; let value = t!(T::from_primitive(pair[1].clone(), resolve)); new_names.push((name, value));