Bounds check "x + 1".

This commit is contained in:
Nigel Tao committed 2017-05-18 15:15:58 +10:00
1 parent a8c304236d
commit 05a217e8a3
2 files changed
+108 -26

No files matched your search

+6 -2
View File
@@ -10,11 +10,15 @@ struct lzw_decoder?(
func lzw_decoder.decode?(dst ptr io.buf1, src ptr io.buf1, src_final bool)() {
var bits u32
var nBits u32
var n_bits u32
// TODO: set clear_code, end_code, etc.
var width u32[:13] = 12
var width u32[:13] = this.literal_width + 1
// TODO: implement.
while n_bits < width {
// TODO.
}
}