-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
More elegant way of solving #5839 (d_private in sceIoDread) #5871
Conversation
We flag filesystems as being FAT32 instead of checking for "ms0:".
@@ -255,6 +255,10 @@ std::string MetaFileSystem::NormalizePrefix(std::string prefix) const { | |||
if (startsWith(prefix, "host")) | |||
prefix = "host0:"; | |||
|
|||
// Should we simply make this case insensitive? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think probably so, but that's probably another matter. I thought we already handled case sensitivity somewhere else but I'm not sure now...
-[Unknown]
static void strcpy_limit(char *dest, const char *src, int count) { | ||
int i; | ||
for (i = 0; i < count; i++) { | ||
if (!src[i]) // Do the check afterwards, so we don't exit before copying the null terminator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this comment seems misplaced.
Also, I think the for ought to go to count - 1
?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings are hard. Depends on if count is the character count or the size we write to, I suppose the latter so count - 1. That comment was from an earlier edit, fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, indeed.
-[Unknown]
We may end up wanting to do something similar to this for disc0/umd0 at some point. -[Unknown] |
More elegant way of solving #5839 (d_private in sceIoDread)
should be More elegant way of solving #5865 |
Ah right. Too late :) |
Flag filesystems as being FAT32 and thus providing this extra struct with short filename etc, instead of checking for "ms0:".
Also replace the strncpy with something that won't write a lot more bytes than needed.