Check assertions on while loop exit.

This commit is contained in:
Nigel Tao committed 2017-05-20 17:05:38 +10:00
1 parent 9184e2682e
commit d5d6447ce5
3 files changed
+139 -43

No files matched your search

+3 -1
View File
@@ -18,7 +18,9 @@ func lzw_decoder.decode?(dst ptr io.buf1, src ptr io.buf1, src_final bool)() {
// TODO: implement.
while n_bits < width {
while n_bits < width,
post n_bits >= width,
{
assert n_bits < 12 via "a < b: a < c <= b"(c:width)
// TODO.
n_bits += 8