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

Corrupt patches for modules named in certain languages #2131

Open
dl471 opened this Issue Mar 3, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@dl471
Copy link
Contributor

dl471 commented Mar 3, 2019

Debugger Version: 3 Mar 2019
Operating System: Windows 7 Professional 64-bit (6.1)
Translation: English and Japanese

When exporting patches for modules with names in certain encodings it seems the patch length gets thrown off and some bytes aren't written. This seems to happen even when using the translations for those languages. This can be reproduced by naming a module テスト or another word in an afflicted language and trying to export a patch for it.

Japanese example:
japanese_name

Hindi example:
hindi_name

Looking at the patch code I think the issue is how the length of the patch for each module is decided. The patch text gets converted to UTF-8 but the length used when writing to the file is the one from before the conversion. Changing the code to use the length of the text from after the conversion to UTF-8 seems to alleviate the issue.

name_after_fix

This is what things look like after the change. The patch for テスト is now written normally. I've submitted a pull request with the changes I made to get that result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.