mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Add a ~+ operator.
This commit is contained in:
1 parent
e7d01e7b2a
commit
6492c52156
8 files changed
+154
-99
No files matched your search
@@ -390,8 +390,7 @@ pri func decoder.decode_huffman?(dst writer1, src reader1)() {
|
||||
}
|
||||
if n_copied > 0 {
|
||||
hlen -= n_copied
|
||||
// TODO: a "~+" tilde-operator that ignores overflow.
|
||||
hdist = (hdist + (n_copied & 0x7FFF)) & 0x7FFF
|
||||
hdist = (hdist ~+ n_copied) & 0x7FFF
|
||||
if hdist == 0 {
|
||||
// Wrap around the this.history ringbuffer.
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user