mirror of https://gitlab.com/basile.b/dexed.git
fix stringrange static ctor from empty string
This commit is contained in:
parent
687191c32e
commit
2699a0a2d5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue