mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Change status "?foo" to just "?foo"
This commit is contained in:
1 parent
5f9d007b1c
commit
875362ea07
14 files changed
+136
-152
No files matched your search
@@ -34,15 +34,15 @@ pub func decoder.decode!??(dst base.io_writer, src base.io_reader) {
|
||||
// Read the header.
|
||||
var c base.u8 = args.src.read_u8!??()
|
||||
if c != 0x1F {
|
||||
return status "?bad header"
|
||||
return "?bad header"
|
||||
}
|
||||
c = args.src.read_u8!??()
|
||||
if c != 0x8B {
|
||||
return status "?bad header"
|
||||
return "?bad header"
|
||||
}
|
||||
c = args.src.read_u8!??()
|
||||
if c != 0x08 {
|
||||
return status "?bad compression method"
|
||||
return "?bad compression method"
|
||||
}
|
||||
var flags base.u8 = args.src.read_u8!??()
|
||||
// TODO: API for returning the header's MTIME field.
|
||||
@@ -85,7 +85,7 @@ pub func decoder.decode!??(dst base.io_writer, src base.io_reader) {
|
||||
|
||||
// Reserved flags bits must be zero.
|
||||
if (flags & 0xE0) != 0 {
|
||||
return status "?bad encoding flags"
|
||||
return "?bad encoding flags"
|
||||
}
|
||||
|
||||
// Decode and checksum the DEFLATE-encoded payload.
|
||||
@@ -107,6 +107,6 @@ pub func decoder.decode!??(dst base.io_writer, src base.io_reader) {
|
||||
var decoded_length_want base.u32 = args.src.read_u32le!??()
|
||||
if (not this.ignore_checksum) and
|
||||
((checksum_got != checksum_want) or (decoded_length_got != decoded_length_want)) {
|
||||
return status "?bad checksum"
|
||||
return "?bad checksum"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user