fix stringrange static ctor from empty string

This commit is contained in:
Basile Burg 2016-03-27 06:41:30 +02:00
parent 687191c32e
commit 2699a0a2d5
1 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,11 @@ implementation
class function TStringRange.create(const str: string): TStringRange;
begin
result.ptr := nil;
result.pos := 0;
result.len := 0;
if str = '' then
exit;
result.ptr := @str[1];
result.pos := 0;
result.len := length(str);