procedure TSimpleMsgPack.setAsString(pvValue: string);
begin
FDataType := mptString;
if SizeOf(Char) = 2 then
begin
SetLength(FValue, length(pvValue) shl 1);
Move(PChar(pvValue)^, FValue[0], Length(FValue));
end else
begin
SetLength(FValue, length(pvValue));
Move(PChar(pvValue)^, FValue[0], Length(FValue)); // <<<<<<<<< error Runtime (201)
end;
end;
Any suggestion will be appreciated.
Any suggestion will be appreciated.
Docs for me:
http://wiki.freepascal.org/Character_and_string_types
http://www.freepascal.org/docs-html/rtl/system/stringfunctions.html
http://www.freepascal.org/docs-html/ref/refsu10.html