mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Temporary code to continue this.lzw.decode calls.
This is a hard-coded, short term fix so that GIF decoding works end-to-end. The long term fix is to have some principled way of responding to non-fatal status codes such as "short read".
This commit is contained in:
1 parent
8ad82f5e1f
commit
8fe438d0b4
3 files changed
+4
-4
No files matched your search
@@ -1214,7 +1214,8 @@ func (g *gen) writeCallSuspendibles(n *a.Expr, depth uint32) error {
|
||||
} else if isDecode(g.tm, n) {
|
||||
g.printf("status = puffs_%s_lzw_decoder_decode(&self->private_impl.f_lzw, %sdst, %s%s);\n",
|
||||
g.pkgName, aPrefix, vPrefix, n.Args()[1].Arg().Value().String(g.tm))
|
||||
g.writes("if (status) { return status; }\n")
|
||||
// TODO: be principled with "if (status&1)" vs "if (status)".
|
||||
g.writes("if (status&1) { return status; }\n")
|
||||
return nil
|
||||
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user