mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Take more care with a NULL reader1 or writer1 buf.
This commit is contained in:
1 parent
10b7d5a031
commit
7b6f7384d1
6 files changed
+28
-21
No files matched your search
@@ -25,11 +25,12 @@ type template_args_short_read struct {
|
||||
}
|
||||
|
||||
func template_short_read(b *buffer, args template_args_short_read) error {
|
||||
b.printf("short_read_%s:\nif (a_%s.limit.ptr_to_len) {\nstatus = %sSUSPENSION_LIMITED_READ;\n} else if (a_%s.buf->closed) {\nstatus = %sERROR_UNEXPECTED_EOF;\ngoto exit;\n} else {\nstatus = %sSUSPENSION_SHORT_READ;\n}\ngoto suspend;\n",
|
||||
b.printf("short_read_%s:\nif (a_%s.limit.ptr_to_len) {\nstatus = %sSUSPENSION_LIMITED_READ;\n} else if (a_%s.buf && a_%s.buf->closed) {\nstatus = %sERROR_UNEXPECTED_EOF;\ngoto exit;\n} else {\nstatus = %sSUSPENSION_SHORT_READ;\n}\ngoto suspend;\n",
|
||||
args.name,
|
||||
args.name,
|
||||
args.PKGPREFIX,
|
||||
args.name,
|
||||
args.name,
|
||||
args.PKGPREFIX,
|
||||
args.PKGPREFIX,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user