Skip to content

Typewriter: Don't allow illegal path characters for file names#237

Merged
prayerie merged 2 commits into
NitrousTracker:newfrom
prayerie:twfix
Apr 24, 2026
Merged

Typewriter: Don't allow illegal path characters for file names#237
prayerie merged 2 commits into
NitrousTracker:newfrom
prayerie:twfix

Conversation

@prayerie

@prayerie prayerie commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Trying to save a song name or a sample name containing any of these characters will cause a crash. The characters are still allowed specifically on the song/inst/sample rename screens.

There's also a new theme colour representing a disabled typewriter key.

Here's a demonstration:

simplescreenrecorder-2026-04-24_17.24.08.mp4

Comment thread tobkit/source/typewriter.cpp Outdated
c = typewriter_Hit[tilex+(tiley*TW_TILE_WIDTH)];

if (is_file_name &&
(c=='<' || c=='>' || c==':' || c=='/' || c=='?' || c=='*'))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the matching code snippet from FatFs to cover all cases: strchr("*:<>|\"\?\x7F", c)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, thanks 😅

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i need to modify this to include forward slash because that also crashes, i'll do that tomorrow

@asiekierka

Copy link
Copy Markdown
Collaborator

Other than that, LGTM

@prayerie prayerie merged commit ac44e44 into NitrousTracker:new Apr 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants