mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
One pattern fill tiles at most 250,000 times (PatternDef::offsets_covering), but Scene::fill writes each tile's own pattern fills again, down to the nesting limit of 8, with nothing bounding the total. A pattern whose tile art is filled with another pattern (or with itself) multiplies the tile count at every level: a small document makes EMF export (the engine's "emf" format, also reachable over MCP and the control channel) run out of memory or never finish, and the unsaved document is lost with it. The scene now keeps one tile budget for the whole walk. A fill whose tiles don't fit in what is left, and every pattern fill after it, is written as one colour like WMF writes patterns, with a warning. The test tiles squares filled with dots (over half a million fills before) and a pattern filled with itself, and checks both stay under the budget. Reported-by: BS.ehlas.cz