Range Check Error in TMVCStreamHelper
dipold opened this issue · 0 comments
dipold commented
Case the Range checking
is True
in Project Options > Delphi Compiler > Compiling
, I am getting Range check error
when AString
is empty in this code:
I think it would be enough to check if the parameter is empty:
procedure TMVCStreamHelper.WriteUTF8(const AString: string);
var
UFTStr: UTF8String;
begin
UFTStr := UTF8String(AString);
if (UFTStr <> '') then
Self.WriteBuffer(UFTStr[Low(UFTStr)], Length(UFTStr));
end;