diff --git a/crates/texrra-tex-core/src/execution/engine/scan_stack.rs b/crates/texrra-tex-core/src/execution/engine/scan_stack.rs index e3785df..e580c88 100644 --- a/crates/texrra-tex-core/src/execution/engine/scan_stack.rs +++ b/crates/texrra-tex-core/src/execution/engine/scan_stack.rs @@ -25,7 +25,8 @@ pub(super) fn enter(scan: impl FnOnce() -> T) -> T { if SEGMENTED { // Scanner and expansion callbacks stay on the caller's thread. // Resource limits count TeX frames independently of the Rust stack. - stacker::maybe_grow(128 * 1024, 1024 * 1024, scan) + // Unoptimized expansion can use over 128 KiB in a single frame. + stacker::maybe_grow(256 * 1024, 1024 * 1024, scan) } else { scan() }