From: Kostya Shishkov Date: Sat, 16 Feb 2019 08:36:43 +0000 (+0100) Subject: smacker: reset only non-empty last symbols X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=af37e28afd991bca600b97a1cb97bc3ad358bc4f;p=nihav.git smacker: reset only non-empty last symbols --- diff --git a/nihav-rad/src/codecs/smacker.rs b/nihav-rad/src/codecs/smacker.rs index 85d0e4f..c77b14f 100644 --- a/nihav-rad/src/codecs/smacker.rs +++ b/nihav-rad/src/codecs/smacker.rs @@ -160,7 +160,9 @@ impl SmackerTree16 { } fn reset(&mut self) { for i in 0..self.last.len() { - self.tree[self.last[i]] = 0; + if self.last[i] != SMK_LAST_UNINIT { + self.tree[self.last[i]] = 0; + } } } }