View previous topic :: View next topic |
Author |
Message |
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Dec 24, 2012 10:26 am Post subject: isBadReadPtr problem. |
|
|
OK, I have some problems. Game uses LUA.
this code works:
Code: | lea eax,[ebp+50]
push 04
push eax
call isbadreadptr
cmp eax,0
jne originalcode |
But when used two times in row, game crash:
Code: |
lea eax,[ebp+50]
push 04
push eax
call isbadreadptr
cmp eax,0
jne originalcode
mov eax,[ebp+50]
push 04
push eax
call isbadreadptr
cmp eax,0
jne originalcode
|
What's wrong?
_________________
Last edited by mgr.inz.Player on Mon Dec 24, 2012 1:21 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Dec 24, 2012 11:20 am Post subject: |
|
|
perhaps the memory has become unreadable after the call to isbadreadptr ?
Or ebp+10 points to a stack location that isn't allocated yet
also, though I bet it won't make a difference, try push 00000004
_________________
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Dec 24, 2012 2:53 pm Post subject: |
|
|
I think I have to step-by-step debug whole script I made for "Don't Starve".
Because, I've tried two isbadreadptr checks in row, in another game Legend of Grimrock v1.1.4 - I made new script from the scratch. And it works as should - no crash.
_________________
|
|
Back to top |
|
|
|