Repository navigation
fix(oot): open voice streams whose path has a double slash - #2035
Merged
Merged
Conversation
Ocarina of Time asks for its voice lines as content://Voice/Resource//Stream/... . The RomFS parser rejects the empty component between "Resource" and "Stream", so every voice stream open returned not-found. Music and effects use a single slash and were unaffected. romfs_path_relative_collapsed collapses repeated separators and then applies the same strict validation, so "." and ".." are still rejected. RomFS and add-on content requests both use it, and romfs_path_relative stays strict. probe-fs gains the Resource//Stream case and a traversal case behind a double slash. tests/test_oot_romfs_paths covers the parser without game files. Found and first fixed by MD5Visual in the games/totk-based port (#4). Co-Authored-By: MD5Visual <134655923+MD5Visual@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017tiHucPmA6R8Fqbf1Y85ny
ly05010419
added a commit
that referenced
this pull request
Nov 10, 2026
…e asks for it (after PR #2035) The probe opened TotK's Sound/Resource/Stream/Dm_OP_0001.bwav, which OoT's RomFS does not have (0 in its index), so probe-fs failed at its first check since the port began. It now takes the first Voice/Resource/Stream/ file of the sorted index, reads it under its own name, and compares the bytes under Voice/Resource//Stream/ and rom://; '..' after either double slash must still fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Merged in 68760b2 and pushed — thank you, and for crediting the original find. One follow-up after it (6bc0ec8): probe-fs still opened TotK's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ocarina of Time asks for its voice lines as
content://Voice/Resource//Stream/....romfs_path_relativerejects the empty component betweenResourceandStream, so every voice stream open returns not-found. Music and effects use a single slash and are unaffected.games/oot/runtime/romfs_path.h: newromfs_path_relative_collapsedcollapses repeated separators and then applies the same validation..and..are still rejected, including right after a double slash, andromfs_path_relativeitself stays strict.romfs.candaoc_romfs.c: RomFS and add-on content requests go through the new function.Resource//Streamcase, plus a traversal behind a double slash that must still fail.tests/test_oot_romfs_paths.{c,py}: 18 parser cases, no game files needed (same pattern as the Dread path test).Tested: the new test plus the existing TotK and Dread path tests pass.
romfs.candaoc_romfs.ccompile with the OoT Makefile's-Wall -Wextra -Werror. Not yet run in game on this port. TheResource//Streamrequests were seen on game version 1.0.0.Found and first fixed by @MD5Visual in the games/totk-based port (Kolkka#4), where the voice lines were confirmed playing in the Goron cutscene.