Problem
The native .yaze parser is not CRLF-safe. std::getline removes \n but leaves \r; section recognition checks line.back() == ']' before removing carriage returns, and key/value trimming removes only spaces/tabs.
A CRLF descriptor therefore silently misses sections and values. Safety flags such as save_dungeon_water_fill_zones=false are not applied, leaving compiled defaults active.
Reproduction
- Convert a valid
.yaze or bundle project.yaze from LF to CRLF.
- Open or run:
z3ed project-bundle-verify --project /path/to/project.yazeproj --format json
Observed on exact tree d02784a79afa334f566ffc260a353a98af45df19:
- parser reports an empty project name
- ROM path is not resolved
[feature_flags] is not recognized
kSaveWaterFillZones remains its compiled default (true)
Relevant code:
src/core/project.cc: ParseFromString() section check
src/core/project.cc: ParseKeyValue() trims only " \t"
src/core/features.h: WaterFill default
Expected
Treat CRLF and LF identically. Strip one trailing \r after std::getline (before comment/section/key parsing), with tests covering:
- LF and CRLF parse equivalently
- standalone
.yaze and bundled project.yaze
- safety flags remain false under CRLF
- lone-CR input either parses deliberately or fails explicitly rather than silently falling back
Current Oracle mitigation
Oracle PR #127 forces generated/checked-in descriptors to LF and its CI rejects CRLF. That protects its documented producer path but does not repair Yaze's general parser behavior.
Problem
The native
.yazeparser is not CRLF-safe.std::getlineremoves\nbut leaves\r; section recognition checksline.back() == ']'before removing carriage returns, and key/value trimming removes only spaces/tabs.A CRLF descriptor therefore silently misses sections and values. Safety flags such as
save_dungeon_water_fill_zones=falseare not applied, leaving compiled defaults active.Reproduction
.yazeor bundleproject.yazefrom LF to CRLF.Observed on exact tree
d02784a79afa334f566ffc260a353a98af45df19:[feature_flags]is not recognizedkSaveWaterFillZonesremains its compiled default (true)Relevant code:
src/core/project.cc:ParseFromString()section checksrc/core/project.cc:ParseKeyValue()trims only" \t"src/core/features.h: WaterFill defaultExpected
Treat CRLF and LF identically. Strip one trailing
\rafterstd::getline(before comment/section/key parsing), with tests covering:.yazeand bundledproject.yazeCurrent Oracle mitigation
Oracle PR #127 forces generated/checked-in descriptors to LF and its CI rejects CRLF. That protects its documented producer path but does not repair Yaze's general parser behavior.