mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 03:39:17 +02:00
The buffer-based tokenizer reads the source into memory once at construction, so the underlying stream fail bit never flips at end-of-input. cParser::ok() was not stream.fail(), so while( parser.ok() ) loops (TMoverParameters::LoadFIZ and similar) never terminated -- they spun on empty tokens past EOF, hanging the vehicle/.fiz load. Redefine ok() as "input still remains" (buffer not exhausted, or for replay not exhausted), which terminates those loops while staying true right after opening a non-empty file (the open checks if(!ok())). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9.3 KiB
9.3 KiB