projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
smacker: reset only non-empty last symbols
[nihav.git]
/
nihav-rad
/
src
/
codecs
/
smacker.rs
diff --git
a/nihav-rad/src/codecs/smacker.rs
b/nihav-rad/src/codecs/smacker.rs
index 85d0e4fceed48bc903c0d03938458e39ae06a44d..c77b14ffcf8d83a13466d70c49d6af7d8f5594ff 100644
(file)
--- 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;
+ }
}
}
}