View previous topic :: View next topic |
Author |
Message |
Redouane Master Cheater Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Thu Aug 25, 2016 3:02 pm Post subject: Additional chars on unicode string |
|
|
This is a Unity game.
Why does this function call return extra characters after "Tenchi Sword"?
The call Code: | readString(0x4F020C, 22, true) | returns "Tenchi Swor" (Last character missing).
-> Look at the dump, not the disassembler.
Description: |
|
Filesize: |
64.22 KB |
Viewed: |
4017 Time(s) |
|
|
|
Back to top |
|
|
predprey Master Cheater Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Thu Aug 25, 2016 3:23 pm Post subject: Re: Additional chars on unicode string |
|
|
Redouane wrote: | This is a Unity game.
Why does this function call return extra characters after "Tenchi Sword"?
The call Code: | readString(0x4F020C, 22, true) | returns "Tenchi Swor" (Last character missing).
-> Look at the dump, not the disassembler. |
use upper limit of 1000 instead of 24. i'm guessing 24 bytes terminates right between two characters, on the null separator, which returns the ?. 1000 upper limit reads the entire string until the null terminator, so don't worry about reading past the end.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Thu Aug 25, 2016 3:28 pm Post subject: |
|
|
it's a bug.
In thise case I think size 25 is recommended. (so it's 0 terminator is also copied which bypasses the bug)
(fixed on github)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Redouane Master Cheater Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Thu Aug 25, 2016 3:53 pm Post subject: |
|
|
Dark Byte wrote: | it's a bug.
In thise case I think size 25 is recommended. (so it's 0 terminator is also copied which bypasses the bug)
(fixed on github) |
Thanks.
predprey wrote: | use upper limit of 1000 instead of 24. i'm guessing 24 bytes terminates right between two characters, on the null separator, which returns the ?. 1000 upper limit reads the entire string until the null terminator, so don't worry about reading past the end. |
I'll add 2 bytes to the length argument, should be enough, thanks.
|
|
Back to top |
|
|
|