Browse Source

* SetString needs correctly typed argument

Michael VAN CANNEYT 2 years ago
parent
commit
70b0cb99d4
2 changed files with 3 additions and 3 deletions
  1. 2 2
      compiler/ldscript.pas
  2. 1 1
      compiler/ogmap.pas

+ 2 - 2
compiler/ldscript.pas

@@ -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;

+ 1 - 1
compiler/ogmap.pas

@@ -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;