 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Nov 20, 2012 3:22 pm Post subject: writeBytes[solved] and Foundlist[solved] |
|
|
Bugs:
- last element from LUA table is ignored - writeBytes(address,luaTable)
- and variable created just before writeBytes is overwritten.
Code: | changeTo = {1,1,1,2}
local aobs = AOBScan(searchString)
if(aobs ~= nil) then
for i=0,(stringlist_getCount(aobs)-1) do
local address=stringlist_getString(aobs,i);
writeBytes('0x'..address ,changeTo)
end
object_destroy(aobs);
aobs=nil
end
|
it writes 1, 1, 1. But it doesn't write '2'.
My first attempt to fix this, I used this code just after first writeBytes:
Code: | writeBytes('0x'..address+#changeTo-1,changeTo[#changeTo]) |
But is doesn't work. Variable address is overwritten with "written bytes" value. In above example, address variable will change to 3.
Full temporary fix needs one dummy variable and above final writeBytes which writes last element:
Code: | changeTo = {1,1,1,2}
local aobs = AOBScan(searchString)
if(aobs ~= nil) then
for i=0,(stringlist_getCount(aobs)-1) do
local address=stringlist_getString(aobs,i);
local dummy=0
writeBytes('0x'..address ,changeTo)
writeBytes('0x'..address+#changeTo-1,changeTo[#changeTo])
end
object_destroy(aobs);
aobs=nil
end
|
or
Code: | (...)
writeBytes('0x'..address,changeTo,#changeTo)
writeBytes('0x'..address+#changeTo-1,changeTo[#changeTo])
(...) |
Summary
There are few ways to temporary fix this:
- first temporary fix (dummy is overwritten, second writeBytes doesn't use luatable ):
Code: | local dummy=0
writeBytes('0x'..address,changeTo)
writeBytes('0x'..address+#changeTo-1,changeTo[#changeTo]) |
- second temporary fix (memory allocated for third param is overwritten, second writeBytes doesn't use luatable)
Code: | writeBytes('0x'..address,changeTo,#changeTo)
writeBytes('0x'..address+#changeTo-1,changeTo[#changeTo]) |
- third temporary fix (add one extra element to table; it will be ignored)(fix not compatible with future fixed CE)
Code: | table.insert(changeTo,'dummy')
writeBytes('0x'..address,changeTo) |
_________________
Last edited by mgr.inz.Player on Fri Nov 23, 2012 6:47 pm; edited 2 times in total |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25806 Location: The netherlands
|
Posted: Tue Nov 20, 2012 7:43 pm Post subject: |
|
|
fixed in the svn and compatible with the third fix
_________________
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: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Nov 22, 2012 7:02 am Post subject: |
|
|
OK, svn 1507 (compiled with Lazarus-1.1-39122-fpc-2.6.1-20121018-win32.exe):
1) writeBytes - fixed
2) searching unicode string, simple scan - bug, CE just hangs, or crash without error
(edit) the same for autoguessed unicode strings (dissect structure)
I tried under Lazarus debugger. I see "SIGSEGV", and I see
SYSTEM_UTF8TOUNICODE$PUNICODECHAR$LONGWORD$PCHAR$LONGWORD$$LONGWORD
or
SYSTEM_SYSGETMEM_FIXED$LONGWORD$$POINTER
Note:
In revision 1490 "unicode string scan" is OK
I think, something (changes made) from revision 1492 mess "string scan".
(Edit)This readAndParsePointer (byteinterpreter.pas) function causes SIGSEGV.
To be more specific, this:
getmem(ws, bytesize+2);
(its inside vtUnicodeString case)
3) foundlist - bug, we only see '???' for custom type scans
_________________
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Fri Nov 23, 2012 8:53 am Post subject: |
|
|
searching unicode string - fixed. Thanks.
Edit:
1) writeBytes - fixed
2) searching unicode string - fixed
3) foundlist for custom type scans - fixed
Thank you.
_________________
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|