mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Have wbmp decoder check for "#bad restart"
This commit is contained in:
1 parent
3fd6aca365
commit
096b7146f0
2 files changed
+36
-1
No files matched your search
@@ -97,7 +97,9 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
|
||||
if this.call_sequence < 1 {
|
||||
this.decode_image_config?(dst: nullptr, src: args.src)
|
||||
} else if this.call_sequence == 1 {
|
||||
// No-op.
|
||||
if this.frame_config_io_position <> args.src.position() {
|
||||
return base."#bad restart"
|
||||
}
|
||||
} else if this.call_sequence == 2 {
|
||||
this.skip_frame?(src: args.src)
|
||||
return base."@end of data"
|
||||
|
||||
Reference in new issue
Block a user