mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Limit the number of coroutines per type to 0x7FFF
This commit is contained in:
1 parent
b8f87debe3
commit
a0984dcdd3
1 file changed
+3
@@ -292,6 +292,9 @@ func (g *gen) gatherFuncImpl(_ *buffer, n *a.Func) error {
|
||||
if n.Public() && n.Effect().Coroutine() {
|
||||
g.numPublicCoroutines[n.Receiver()]++
|
||||
coroID = g.numPublicCoroutines[n.Receiver()]
|
||||
if coroID >= 0x8000 {
|
||||
return fmt.Errorf("too many coroutines for %q", n.Receiver().Str(g.tm))
|
||||
}
|
||||
}
|
||||
|
||||
g.currFunk = funk{
|
||||
|
||||
Reference in new issue
Block a user