Skip to content

Conversation

@sum2012
Copy link
Collaborator

@sum2012 sum2012 commented Jun 12, 2020

jpcsp ref:
jpcsp/jpcsp@b4158f2
Used in "Code Geass: Lost Colors" chinese patched game
Not tested due to #13021
I am not sure right "return s1 + index"

std::string str1 = Memory::GetCharPointer(s1);
std::string str2 = Memory::GetCharPointer(s2);
int index = str1.find(str2);
if (index < 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd suggest, to avoid warnings:

size_t index = str1.find(str2);
if (index == str1.npos) {
    return 0;
}
return s1 + (uint32_t)index;

Although, it ought to be the same.

-[Unknown]

@sum2012
Copy link
Collaborator Author

sum2012 commented Jun 13, 2020

@unknownbrackets done

@hrydgard hrydgard merged commit 21e02fb into hrydgard:master Jun 13, 2020
@sum2012 sum2012 deleted the sysclib_minor branch June 13, 2020 21:23
@unknownbrackets unknownbrackets added this to the v1.10.0 milestone Jun 22, 2020
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.

3 participants