Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong use of sizeof() on char* #222

Closed
wants to merge 1 commit into from

Conversation

drogenlied
Copy link
Contributor

Since commit dd12606, the handling of files assigned to SCSI IDs with the IMG0...IMG9 key is broken if the file name is longer than 3 characters.

DIR0...DIR9 is broken in a similar fashion.

Using RAW sections of the SD card is broken as well if specified in the .ini file.

This PR passes the buffer length in getImg() and getDir() so that the file and directory names do not get truncated at the size of a char pointer.

@erichelgeson
Copy link
Contributor

Thanks for the PR! I'll give it a test and merge in later this week when I have some free time.

@erichelgeson
Copy link
Contributor

Tested ImgDir with a long name and IMG0..9 on my BlueSCSI worked! Thanks for the PR! (I'm going to cherry pick it in momentarily as I forgot to push up the flip back to dev last release).

Thanks again!

@erichelgeson
Copy link
Contributor

Cherry picked to main 5087e94

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