From 790abd5a1d9e1182d70b8460147953824b6fdb5a Mon Sep 17 00:00:00 2001 From: Kai Schmidt Date: Sat, 29 Jun 2024 11:03:34 -0700 Subject: [PATCH] re-fix a crash --- src/compile/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile/mod.rs b/src/compile/mod.rs index 97eac4903..1349edae2 100644 --- a/src/compile/mod.rs +++ b/src/compile/mod.rs @@ -646,7 +646,7 @@ code: if len > 1 { (self.asm.instrs).push(Instr::Comment(format!("({id}").into())); } - let start = self.asm.instrs.len(); + let start = if len == 0 { 0 } else { self.asm.instrs.len() }; let mut hasher = DefaultHasher::new(); instrs.hash(&mut hasher); let hash = hasher.finish();