upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/loader_test.cpp
diff options
context:
space:
mode:
authorDiego Casares <uo302320@uniovi.es>2026-11-21 23:19:20 +0100
committerDiego Casares <uo302320@uniovi.es>2026-11-21 23:21:29 +0100
commit76b7b5b329f264dacc0e48b6396333f919252bf6 (patch)
tree3d5ddbfbcd539aae4b7b8fcff05e7e9ab5d3eb4d /runtime/test/loader_test.cpp
parent36ace7135e897c228eede5d1d8c28e972285cb14 (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/test/loader_test.cpp')
0 files changed, 0 insertions, 0 deletions