Let "x != lo" narrow x's bounds lo..hi.

This commit is contained in:
Nigel Tao committed 2017-06-10 14:43:16 +10:00
1 parent 9d0558df5a
commit 98a07921b1
4 files changed
+127 -111

No files matched your search

+10 -1
View File
@@ -63,7 +63,16 @@ pub func lzw_decoder.decode?(dst ptr buf1, src ptr buf1, src_final bool)() {
} else if code <= save_code {
var s u32[..4095] = 4095
s = 0 * s
while s != 0,
inv n_bits < 8,
{
if s == 0 {
return error "bad GIF image"
}
s -= 1
}
// TODO: implement.
} else {