|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
grasmanek94 Master Cheater Reputation: 0
Joined: 03 Jun 2008 Posts: 283 Location: The Netherlands
|
Posted: Mon Mar 03, 2014 4:56 pm Post subject: [Bug Report] Between [a] ... [b] mixed up |
|
|
When you have the 'between' values search, and you look for values between -1000 and 1000, cheat engine gives 0 results, when you look for between 1000 and -1000 wrong results are given (values above 1000 and below -1000). I don't know what causes this behaviour and IMHO is shouldn't matter which order is used and has to work correctly, right?
I hope this will be fixed soon!
|
|
Back to top |
|
|
Geri Moderator Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Mon Mar 03, 2014 5:06 pm Post subject: |
|
|
I have used this feature so many times, but it seems I have never used it with negative values.
_________________
|
|
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 Mar 03, 2014 5:12 pm Post subject: |
|
|
Probably because of sign bit.
I think you need this setting:
"show values as if they are signed" in CE options (general settings)
But, unfortunately, it is ignored by "between" scans.
In MemScan.pas
Code: | function TScanner.ByteBetween(newvalue,oldvalue: pointer):boolean;
begin
result:=(pbyte(newvalue)^>=byte(value)) and (pbyte(newvalue)^<=byte(value2));
end;
function TScanner.WordBetween(newvalue,oldvalue: pointer):boolean;
begin
result:=(pword(newvalue)^>=word(value)) and (pword(newvalue)^<=word(value2));
end;
function TScanner.DWordBetween(newvalue,oldvalue: pointer):boolean;
begin
result:=(pdword(newvalue)^>=dword(value)) and (pdword(newvalue)^<=dword(value2));
end;
function TScanner.QWordBetween(newvalue,oldvalue: pointer):boolean;
begin
result:=(PQWORD(newvalue)^>=uint64(value)) and (PQWORD(newvalue)^<=uint64(value2));
end; |
and there are *****BetweenPercentage functions.
So, 4byte scan between -1000 and 1000 will be in fact: between 4294966296 and 1000
As we know, we can not find value which is bigger than 4294966296 and at the same time smaller than 1000.
Doing scan between 1000 and -1000 will be in fact: between 1000 and 4294966296
EDIT:
looks like there is workaround, use AA customType:
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
TypeName:
db 'signed int32',0
ByteSize:
dd 4
ConvertRoutine:
[64-bit]
mov eax,[rcx]
ret
[/64-bit]
[32-bit]
push ebp
mov ebp,esp
mov eax,[ebp+8]
mov eax,[eax]
pop ebp
ret 4
[/32-bit]
ConvertBackRoutine:
[64-bit]
mov [rdx],ecx
ret
[/64-bit]
[32-bit]
push ebp
mov ebp,esp
push eax
push ebx
mov eax,[ebp+8]
mov ebx,[ebp+c]
mov [ebx],eax
pop ebx
pop eax
pop ebp
ret 8
[/32-bit] |
and do not forget to enable "show values as if they are signed" in CE options (general settings).
Note: it will also find tremendous amount of zeros.
_________________
|
|
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
|
|