Merge branch 'xml-str-fix' into 'main'

[Bug Fix] TStringConstNode DEBUG_NODE_XML Compilation

See merge request freepascal.org/fpc/source!981
This commit is contained in:
J. Gareth "Kit" Moreton 2025-04-04 21:22:59 +00:00
commit 5487615207

View File

@ -1306,10 +1306,10 @@ implementation
begin
{ value_str is of type PCompilerWideString }
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;
else
OutputStr := ansistring(value_str);
OutputStr := PAnsichar(@valueas[0]);
SetLength(OutputStr, len);
end;