* SetString needs correctly typed argument

This commit is contained in:
Michael VAN CANNEYT 2023-01-30 15:02:49 +01:00 committed by Michaël Van Canneyt
parent 24109eb2a6
commit 70b0cb99d4
2 changed files with 3 additions and 3 deletions

View File

@ -278,9 +278,9 @@ procedure TScriptLexer.nextToken;
tkLSHIFT..tkEQ: inc(p,2);
#32..#255: inc(p);
tkIDENT,tkNUMBER:
setstring(curtokenstr,@data[start],p-start);
setstring(curtokenstr,PChar(@data[start]),p-start);
tkLITERAL:
setstring(curtokenstr,@data[start+1],p-start-2);
setstring(curtokenstr,PChar(@data[start+1]),p-start-2);
end;
curpos:=p;
end;

View File

@ -81,7 +81,7 @@ implementation
end;
tmp[i]:='x';
tmp[i-1]:='0';
setstring(result,@tmp[i-1],high(tmp)+2-i);
setstring(result,PChar(@tmp[i-1]),high(tmp)+2-i);
end;
end;