-
-
Notifications
You must be signed in to change notification settings - Fork 375
Closed
Labels
acceptedIssue has been accepted and inserted in a future milestoneIssue has been accepted and inserted in a future milestone
Milestone
Description
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:
Self.WriteBuffer(UFTStr[low(UFTStr)], Length(UFTStr)); |
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;
Metadata
Metadata
Assignees
Labels
acceptedIssue has been accepted and inserted in a future milestoneIssue has been accepted and inserted in a future milestone