Browse Source

* Fixed oversight in TStringConstNode that stopped it building under DEBUG_NODE_XML

J. Gareth "Curious Kit" Moreton 4 months ago
parent
commit
b0852b70c6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/ncon.pas

+ 2 - 2
compiler/ncon.pas

@@ -1306,10 +1306,10 @@ implementation
           begin
           begin
             { value_str is of type PCompilerWideString }
             { value_str is of type PCompilerWideString }
             SetLength(OutputStr, len);
             SetLength(OutputStr, len);
-            UnicodeToUtf8(PChar(OutputStr), PUnicodeChar(PCompilerWideString(value_str)^.data), len + 1); { +1 for the null terminator }
+            UnicodeToUtf8(PChar(OutputStr), PUnicodeChar(valuews.data), len + 1); { +1 for the null terminator }
           end;
           end;
         else
         else
-          OutputStr := ansistring(value_str);
+          OutputStr := PAnsichar(@valueas[0]);
           SetLength(OutputStr, len);
           SetLength(OutputStr, len);
         end;
         end;