Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: byteinterpreter.pas
- ===================================================================
- --- byteinterpreter.pas (wersja 1481)
- +++ byteinterpreter.pas (kopia robocza)
- @@ -101,6 +101,8 @@
- begin
- if customtype.scriptUsesFloat then
- customtype.ConvertFloatToData(s, ba)
- + else if customtype.scriptUsesDouble then
- + customtype.ConvertDoubleToData(d, ba)
- else
- customtype.ConvertIntegerToData(v, ba);
- @@ -271,12 +273,14 @@
- if ReadProcessMemory(processhandle,pointer(address),buf2,customtype.bytesize,x) then
- begin
- try
- - if showashexadecimal and (customtype.scriptUsesFloat=false) then
- + if showashexadecimal and (customtype.scriptUsesFloat=false) and (customtype.scriptUsesDouble=false) then
- result:=inttohex(customtype.ConvertDataToInteger(buf2),8)
- else
- begin
- if customtype.scriptUsesFloat then
- result:=FloatToStr(customtype.ConvertDataToFloat(buf2))
- + else if customtype.scriptUsesDouble then
- + result:=FloatToStr(customtype.ConvertDataToDouble(buf2))
- else
- result:=IntToStr(customtype.ConvertDataToInteger(buf2));
- end;
- Index: CustomTypeHandler.pas
- ===================================================================
- --- CustomTypeHandler.pas (wersja 1481)
- +++ CustomTypeHandler.pas (kopia robocza)
- @@ -10,8 +10,8 @@
- uses
- {windows, }dialogs, Classes, SysUtils,cefuncproc, autoassembler, lua, lauxlib, lualib, luahandler;
- -type TConversionRoutine=function(data: pointer):integer; stdcall;
- -type TReverseConversionRoutine=procedure(i: integer; output: pointer); stdcall;
- +type TConversionRoutine=function(data: pointer):qword; stdcall;
- +type TReverseConversionRoutine=procedure(i: qword; output: pointer); stdcall;
- type
- @@ -34,6 +34,7 @@
- currentscript: tstringlist;
- fCustomTypeType: TCustomTypeType; //plugins set this to cttPlugin
- fScriptUsesFloat: boolean;
- + fScriptUsesDouble: boolean;
- @@ -46,6 +47,8 @@
- preferedAlignment: integer;
- //these 4 functions are just to make it easier
- + procedure ConvertToData(d: double; output: pointer); overload;
- + function ConvertFromData(data: pointer): double; overload;
- procedure ConvertToData(f: single; output: pointer); overload;
- function ConvertFromData(data: pointer): single; overload;
- procedure ConvertToData(i: integer; output: pointer); overload;
- @@ -61,6 +64,8 @@
- procedure ConvertFloatToData(f: single; output: pointer);
- procedure ConvertFloatToDataLua(f: single; output: pbytearray);
- + function ConvertDataToDouble(data: pointer): double;
- + procedure ConvertDoubleToData(d: double; output: pointer);
- function getScript:string;
- @@ -77,6 +82,7 @@
- property CustomTypeType: TCustomTypeType read fCustomTypeType;
- property script: string read getScript write setScript;
- property scriptUsesFloat: boolean read fScriptUsesFloat;
- + property scriptUsesDouble: boolean read fScriptUsesDouble;
- end;
- PCustomType=^TCustomType;
- @@ -404,6 +410,41 @@
- result:=f;
- end;
- +procedure TCustomType.ConvertDoubleToData(d: double; output: pointer);
- +var i: qword;
- +begin
- + i:=pqword(@d)^; //convert the d to a qword without conversion
- + if assigned(reverseroutine) then reverseroutine(i,output)
- +end;
- +
- +function TCustomType.ConvertDataToDouble(data: pointer): double;
- +var
- + i: qword;
- + d: double absolute i;
- +begin
- + if assigned(routine) then
- + begin
- + i:=routine(data);
- +
- + if not fScriptUsesDouble then //the result is in integer format ,
- + d:=i; //convert the integer to double
- + end
- + else
- + d:=0;
- +
- + result:=d;
- +end;
- +
- +procedure TCustomType.ConvertToData(d: double; output: pointer);
- +begin
- + ConvertDoubleToData(d, output);
- +end;
- +
- +function TCustomType.ConvertFromData(data: pointer): double;
- +begin
- + result:=ConvertDataToDouble(data);
- +end;
- +
- procedure TCustomType.ConvertToData(f: single; output: pointer);
- begin
- ConvertFloatToData(f, output);
- @@ -455,6 +496,7 @@
- oldfunctiontypename: string;
- newpreferedalignment, oldpreferedalignment: integer;
- oldScriptUsesFloat, newScriptUsesFloat: boolean;
- + oldScriptUsesDouble, newScriptUsesDouble: boolean;
- newroutine, oldroutine: TConversionRoutine;
- newreverseroutine, oldreverseroutine: TReverseConversionRoutine;
- newbytesize, oldbytesize: integer;
- @@ -467,6 +509,7 @@
- oldbytesize:=bytesize;
- oldpreferedalignment:=preferedalignment;
- oldScriptUsesFloat:=fScriptUsesFloat;
- + oldScriptUsesDouble:=fScriptUsesDouble;
- setlength(oldallocarray, length(c));
- for i:=0 to length(c)-1 do
- @@ -486,6 +529,7 @@
- begin
- newpreferedalignment:=-1;
- newScriptUsesFloat:=false;
- + newScriptUsesDouble:=false;
- //find alloc "ConvertRoutine"
- for i:=0 to length(c)-1 do
- @@ -505,6 +549,9 @@
- if uppercase(c[i].varname)='USESFLOAT' then
- newScriptUsesFloat:=pbyte(c[i].address)^<>0;
- + if uppercase(c[i].varname)='USESDOUBLE' then
- + newScriptUsesDouble:=pbyte(c[i].address)^<>0;
- +
- if uppercase(c[i].varname)='CONVERTBACKROUTINE' then
- newreverseroutine:=pointer(c[i].address);
- end;
- @@ -524,6 +571,7 @@
- preferedAlignment:=newpreferedalignment;
- fScriptUsesFloat:=newScriptUsesFloat;
- + fScriptUsesDouble:=newScriptUsesDouble;
- fCustomTypeType:=cttAutoAssembler;
- if currentscript<>nil then
- @@ -625,6 +673,7 @@
- bytesize:=oldbytesize;
- preferedAlignment:=oldpreferedalignment;
- fScriptUsesFloat:=oldScriptUsesFloat;
- + fScriptUsesDouble:=oldScriptUsesDouble;
- setlength(c,length(oldallocarray));
- for i:=0 to length(oldallocarray)-1 do
- Index: MainUnit.pas
- ===================================================================
- --- MainUnit.pas (wersja 1481)
- +++ MainUnit.pas (kopia robocza)
- @@ -2048,7 +2050,7 @@
- if (vartype.ItemIndex in [5, 6, 9]) or (vartype.ItemIndex >= 11) then //float/all, custom
- begin
- ct:=TCustomtype(vartype.Items.Objects[vartype.itemindex]);
- - if (ct=nil) or (ct.scriptUsesFloat) then
- + if (ct=nil) or (ct.scriptUsesFloat) or (ct.scriptUsesDouble) then
- begin
- //handle as a float value
- if oldindex = 0 then
- Index: MemoryRecordUnit.pas
- ===================================================================
- --- MemoryRecordUnit.pas (wersja 1481)
- +++ MemoryRecordUnit.pas (kopia robocza)
- @@ -1473,6 +1473,8 @@
- begin
- if customtype.scriptUsesFloat then
- result:=FloatToStr(customtype.ConvertDataToFloat(buf))
- + else if customtype.scriptUsesDouble then
- + result:=FloatToStr(customtype.ConvertDataToDouble(buf))
- else
- if showashex then result:=inttohex(customtype.ConvertDataToInteger(buf),8) else if showassigned then result:=inttostr(integer(customtype.ConvertDataToInteger(buf))) else result:=inttostr(customtype.ConvertDataToInteger(buf));
- end
- @@ -1661,6 +1663,8 @@
- Begin
- if customtype.scriptUsesFloat then
- customtype.ConvertFloatToData(strtofloat(currentValue), ps)
- + else if customtype.scriptUsesDouble then
- + customtype.ConvertDoubleToData(strtofloat(currentValue), pd)
- else
- customtype.ConvertIntegerToData(strtoint(currentValue), pdw);
- Index: memscan.pas
- ===================================================================
- --- memscan.pas (wersja 1481)
- +++ memscan.pas (kopia robocza)
- @@ -62,6 +62,7 @@
- function DoubleScan(minf,maxf: double; buf: pointer; var startoffset: integer): boolean;
- function CustomScan(ct: Tcustomtype; value: integer; buf: pointer; var startoffset: integer): boolean;
- function CustomScanFloat(ct: Tcustomtype; minf, maxf: single; buf: pointer; var startoffset: integer): boolean;
- + function CustomScanDouble(ct: Tcustomtype; minf, maxf: single; buf: pointer; var startoffset: integer): boolean;
- function StringScan(st: pchar; buf: Pbytearray; var startoffset: integer): boolean;
- function WideStringScan(st: pwidechar; buf: Pbytearray; var startoffset: integer): boolean;
- @@ -291,6 +292,19 @@
- function CustomFloatUnChanged(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleExact(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleBetween(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleBetweenPercentage(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleBiggerThan(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleSmallerThan(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleIncreasedValue(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleIncreasedValueBy(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleIncreasedValueByPercentage(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleDecreasedValue(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleDecreasedValueBy(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleDecreasedValueByPercentage(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleChanged(newvalue,oldvalue: pointer): boolean;
- + function CustomDoubleUnChanged(newvalue,oldvalue: pointer): boolean;
- //following types only have exact: Array of byte, binary and string
- function ArrayOfByteExact(newvalue,oldvalue: pointer):boolean;
- @@ -809,6 +823,11 @@
- f:=groupdata[i].customType.ConvertDataToFloat(newvalue);
- result:=groupdata[i].wildcard or ((f>groupdata[i].minfvalue) and (f<groupdata[i].maxfvalue));
- end
- + else if groupdata[i].customType.scriptUsesDouble then
- + begin
- + f:=groupdata[i].customType.ConvertDataToDouble(newvalue);
- + result:=groupdata[i].wildcard or ((f>groupdata[i].minfvalue) and (f<groupdata[i].maxfvalue));
- + end
- else
- result:=groupdata[i].wildcard or (groupdata[i].customType.ConvertDataToInteger(newvalue)=groupdata[i].valuei);
- @@ -1041,7 +1060,39 @@
- end;
- +function TGroupData.CustomScanDouble(ct: Tcustomtype; minf, maxf: single; buf: pointer; var startoffset: integer): boolean;
- +var current: pointer;
- + i: integer;
- + align: integer;
- + f: single;
- +begin
- + result:=false;
- + if outoforder_aligned then
- + align:=4
- + else
- + align:=1;
- + current:=buf;
- + inc(current, startoffset);
- + i:=startoffset;
- +
- + while i<(blocksize-ct.bytesize-1) do
- + begin
- + f:=ct.ConvertDataToDouble(current);
- + if (f>minf) and (f<maxf) then
- + begin
- + startoffset:=i+1;
- + result:=true;
- + exit;
- + end;
- +
- + inc(current,align);
- + inc(i,align);
- + end;
- +
- +end;
- +
- +
- function TGroupData.StringScan(st: pchar; buf: Pbytearray; var startoffset: integer): boolean;
- var i: integer;
- begin
- @@ -1199,6 +1250,8 @@
- if groupdata[i].customtype.scriptUsesFloat then
- result:=CustomScanFloat(groupdata[i].customtype, groupdata[i].minfvalue, groupdata[i].maxfvalue, newvalue, currentoffset)
- + else if groupdata[i].customtype.scriptUsesDouble then
- + result:=CustomScanDouble(groupdata[i].customtype, groupdata[i].minfvalue, groupdata[i].maxfvalue, newvalue, currentoffset)
- else
- result:=CustomScan(groupdata[i].customtype, groupdata[i].valuei, newvalue, currentoffset);
- @@ -1237,6 +1290,8 @@
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatExact(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleExact(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomExact(newvalue,oldvalue)
- end;
- @@ -1280,6 +1335,8 @@
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatBetween(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleBetween(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomBetween(newvalue,oldvalue)
- end;
- @@ -1322,6 +1379,8 @@
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatBetweenPercentage(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleBetweenPercentage(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomBetweenPercentage(newvalue,oldvalue)
- end;
- @@ -1363,6 +1422,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatBiggerThan(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleBiggerThan(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomBiggerThan(newvalue,oldvalue)
- end;
- @@ -1404,6 +1465,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatSmallerThan(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleSmallerThan(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomSmallerThan(newvalue,oldvalue)
- end;
- @@ -1445,6 +1508,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatIncreasedValue(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleIncreasedValue(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomIncreasedValue(newvalue,oldvalue)
- end;
- @@ -1486,6 +1551,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatIncreasedValueBy(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleIncreasedValueBy(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomIncreasedValueBy(newvalue,oldvalue)
- end;
- @@ -1527,6 +1594,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatIncreasedValueByPercentage(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleIncreasedValueByPercentage(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomIncreasedValueByPercentage(newvalue,oldvalue)
- end;
- @@ -1569,6 +1638,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatDecreasedValue(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleDecreasedValue(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomDecreasedValue(newvalue,oldvalue)
- end;
- @@ -1610,6 +1681,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatDecreasedValueBy(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleDecreasedValueBy(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomDecreasedValueBy(newvalue,oldvalue)
- end;
- @@ -1651,6 +1724,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatDecreasedValueByPercentage(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleDecreasedValueByPercentage(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomDecreasedValueByPercentage(newvalue,oldvalue)
- end;
- @@ -1692,6 +1767,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatChanged(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleChanged(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomChanged(newvalue,oldvalue)
- end;
- @@ -1733,6 +1810,8 @@
- customtype:=tcustomtype(customTypes[j]);
- if customtype.scriptUsesFloat then
- customtypesmatch[j]:=customtypesmatch[j] and CustomFloatUnchanged(newvalue,oldvalue)
- + else if customtype.scriptUsesDouble then
- + customtypesmatch[j]:=customtypesmatch[j] and CustomDoubleUnchanged(newvalue,oldvalue)
- else
- customtypesmatch[j]:=customtypesmatch[j] and CustomUnchanged(newvalue,oldvalue)
- end;
- @@ -2131,6 +2210,100 @@
- end;
- // ^^^^CustomFloat^^^^
- +
- +//--------------Custom Double-------------
- +
- +function TScanner.CustomDoubleExact(newvalue,oldvalue: pointer): boolean;
- +var d: double;
- +begin
- + result:=false;
- + d:=customType.ConvertDataToDouble(newvalue);
- + case roundingtype of
- + rtRounded:
- + result:=(RoundTo(d,-floataccuracy)=svalue);
- +
- + rtExtremerounded:
- + result:=(d>minsvalue) and (d<maxsvalue);
- +
- + rtTruncated:
- + result:=(d>=svalue) and (d<maxsvalue);
- + end;
- +
- +end;
- +
- +function TScanner.CustomDoubleBetween(newvalue,oldvalue: pointer):boolean;
- +var d: double;
- +begin
- + d:=customType.ConvertDataToDouble(newvalue);
- + result:=(d>=svalue) and (d<=svalue2);
- +end;
- +
- +function TScanner.CustomDoubleBetweenPercentage(newvalue,oldvalue: pointer): boolean;
- +var new: double;
- + old: double;
- +begin
- + new:=customType.ConvertDataToDouble(newvalue);
- + old:=customType.ConvertDataToDouble(oldvalue);
- + result:=(new>old*svalue) and (new<=old*svalue2);
- +end;
- +
- +function TScanner.CustomDoubleBiggerThan(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=customType.ConvertDataToDouble(newvalue)>svalue;
- +end;
- +
- +function TScanner.CustomDoubleSmallerThan(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=customType.ConvertDataToDouble(newvalue)<svalue;
- +end;
- +
- +function TScanner.CustomDoubleIncreasedValue(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=customType.ConvertDataToDouble(newvalue)>customType.ConvertDataToDouble(oldvalue);
- +end;
- +
- +function TScanner.CustomDoubleIncreasedValueBy(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=RoundTo(customType.ConvertDataToDouble(newvalue),-floataccuracy)=RoundTo(customType.ConvertDataToDouble(oldvalue)+svalue,-floataccuracy);
- +end;
- +
- +function TScanner.CustomDoubleDecreasedValue(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=customType.ConvertDataToDouble(newvalue)<customType.ConvertDataToDouble(oldvalue);
- +end;
- +
- +function TScanner.CustomDoubleDecreasedValueBy(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=RoundTo(customType.ConvertDataToDouble(newvalue),-floataccuracy)=RoundTo(customType.ConvertDataToDouble(oldvalue)-svalue,-floataccuracy);
- +end;
- +
- +function TScanner.CustomDoubleIncreasedValueByPercentage(newvalue,oldvalue: pointer): boolean;
- +var new, old: double;
- +begin
- + new:=customType.ConvertDataToDouble(newvalue);
- + old:=customType.ConvertDataToDouble(oldvalue);
- + result:=(new>old+old*svalue) and (new<old+old*svalue2);
- +end;
- +
- +function TScanner.CustomDoubleDecreasedValueByPercentage(newvalue,oldvalue: pointer): boolean;
- +var new, old: double;
- +begin
- + new:=customType.ConvertDataToDouble(newvalue);
- + old:=customType.ConvertDataToDouble(oldvalue);
- + result:=(new>old-old*svalue2) and (new<old-old*svalue);
- +end;
- +
- +function TScanner.CustomDoubleChanged(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=customType.ConvertDataToDouble(newvalue)<>customType.ConvertDataToDouble(oldvalue);
- +end;
- +
- +function TScanner.CustomDoubleUnchanged(newvalue,oldvalue: pointer):boolean;
- +begin
- + result:=customType.ConvertDataToDouble(newvalue)=customType.ConvertDataToDouble(oldvalue);
- +end;
- +// ^^^^CustomDouble^^^^
- +
- //dword:
- function TScanner.DWordExact(newvalue,oldvalue: pointer): boolean;
- begin
- @@ -2428,14 +2601,23 @@
- Generic routine for storing results. Use as last resort. E.g custom scans
- }
- var f: single;
- + d: double;
- begin
- //save varsize
- - if (variableType = vtCustom) and (customtype<>nil) and (customtype.scriptUsesFloat) then
- + if (variableType = vtCustom) and (customtype<>nil) then
- begin
- - //check if it's a valid float result
- - f:=customType.ConvertDataToFloat(oldvalue); //get value
- - if isnan(f) or IsInfinite(f) then exit; //check if valid, if not, exit
- -
- + if customtype.scriptUsesFloat then
- + begin
- + //check if it's a valid float result
- + f:=customType.ConvertDataToFloat(oldvalue); //get value
- + if isnan(f) or IsInfinite(f) then exit; //check if valid, if not, exit
- + end
- + else if customtype.scriptUsesDouble then
- + begin
- + //check if it's a valid float result
- + d:=customType.ConvertDataToDouble(oldvalue); //get value
- + if isnan(d) or IsInfinite(d) then exit; //check if valid, if not, exit
- + end
- end;
- PPtrUintArray(CurrentAddressBuffer)[found]:=address;
- @@ -3904,6 +4086,30 @@
- soUnChanged: checkroutine:=customFloatUnchanged;
- end;
- end
- + else if customType.scriptUsesDouble then
- + begin
- + case scanOption of
- + soExactValue: checkRoutine:=customDoubleExact;
- + soValueBetween: if percentage then
- + checkroutine:=customDoubleBetweenPercentage
- + else
- + checkroutine:=customDoubleBetween;
- + soBiggerThan: checkroutine:=customDoubleBiggerThan;
- + soSmallerThan: checkroutine:=customDoubleSmallerThan;
- + soIncreasedValue: checkroutine:=customDoubleIncreasedValue;
- + soIncreasedValueBy: if percentage then
- + checkroutine:=customDoubleIncreasedValueByPercentage
- + else
- + checkroutine:=customDoubleIncreasedValueBy;
- + soDecreasedValue: checkroutine:=customDoubleDecreasedValue;
- + soDecreasedValueBy: if percentage then
- + checkroutine:=customDoubleDecreasedValueByPercentage
- + else
- + checkroutine:=customDoubleDecreasedValueBy;
- + soChanged: checkroutine:=customDoubleChanged;
- + soUnChanged: checkroutine:=customDoubleUnchanged;
- + end;
- + end
- else
- begin
- case scanOption of
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement