diff options
| author | Diego Casares <uo302320@uniovi.es> | 2026-11-21 23:19:20 +0100 |
|---|---|---|
| committer | Diego Casares <uo302320@uniovi.es> | 2026-11-21 23:21:29 +0100 |
| commit | 76b7b5b329f264dacc0e48b6396333f919252bf6 (patch) | |
| tree | 3d5ddbfbcd539aae4b7b8fcff05e7e9ab5d3eb4d /runtime/src/tls_host.cpp | |
| parent | 36ace7135e897c228eede5d1d8c28e972285cb14 (diff) | |
Index tools: refuse --limit/--start values that scan nothing, survive empty archives
bvh_index, page_index, story_index, navmesh_index and psin_index:
- --limit 0 meant "no limit" (0 is falsy) and a negative --limit scanned
nothing and still exited 0 with an empty index. --limit must now be at
least 1 and --start 0 or more; argparse rejects anything else (rc 2).
- An empty .rpf crashed in mmap ("cannot mmap an empty file") and a file
shorter than the header word crashed in struct.unpack_from. bvh, page and
story now treat both as an archive with no streams.
- bvh_index directory mode: one bad archive no longer aborts the scan and
loses the results of the others; it is reported and skipped.
- A --start past the end of the archive is a one-line error (rc 2) instead
of a traceback (bvh also checked nothing and reported a negative span).
- page_index checks the output extension before the scan, not after it.
Docs: the accepted ranges and the empty-archive behaviour are written next
to each tool's usage in docs/{bvh,navmesh,page_directory,psin,story}.md.
Tests: synthetic cases for each tool; they fail on main and pass here.
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions