Apply De Morgan's law for "not (a or b)".

This commit is contained in:
Nigel Tao committed 2017-06-22 13:53:31 +10:00
1 parent 1a42706bf1
commit cc3c214f1e
4 files changed
+33 -11

No files matched your search

+4 -1
View File
@@ -6,6 +6,7 @@
pub error "bad GIF block"
pub error "bad GIF extension label"
pub error "bad GIF header"
pub error "bad LZW literal width"
pub error "TODO: unsupported Local Color Table"
@@ -138,7 +139,9 @@ pri func decoder.decode_id?(src reader1)() {
var literal_width u8 = in.src.read_u8?()
// TODO: call this.lzw.set_literal_width.
literal_width *= 0 // Avoid "unused variable" C compiler warning.
if (literal_width < 2) or (8 < literal_width) {
return error "bad LZW literal width"
}
// TODO: pass the data blocks' payload to this.lzw.
while true {