mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
cgen: generate 123u (instead of 123) more often
This commit is contained in:
1 parent
805e37915f
commit
50d765839c
3 files changed
+46
-47
No files matched your search
@@ -233,7 +233,7 @@ func (g *gen) writeBuiltinIOReader(b *buffer, recv *a.Expr, method t.ID, args []
|
||||
return nil
|
||||
|
||||
case t.IDMatch7:
|
||||
b.printf("wuffs_base__io_reader__match7(%s%s, %s%s, %s,",
|
||||
b.printf("wuffs_base__io_reader__match7(%s%s, %s%s, %s, ",
|
||||
iopPrefix, recvName, io2Prefix, recvName, recvName)
|
||||
if err := g.writeExpr(b, args[0].AsArg().Value(), false, depth); err != nil {
|
||||
return err
|
||||
|
||||
@@ -45,8 +45,7 @@ func (g *gen) writeExpr(b *buffer, n *a.Expr, sideEffectsOnly bool, depth uint32
|
||||
// https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59018
|
||||
// but we should generate 123u instead of 123 more broadly.
|
||||
const minIncl = 0xFFFFADFD
|
||||
const maxIncl = 0xFFFFF384
|
||||
if i := cv.Int64(); (minIncl <= i) && (i <= maxIncl) {
|
||||
if i := cv.Int64(); minIncl <= i {
|
||||
b.writeb('u')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user