mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 10:48:12 +02:00
merge r14123 from cpstrnew branch by paul:
fix string ref count for empty strings git-svn-id: trunk@19089 -
This commit is contained in:
parent
5e9ee14ee7
commit
afa559ab2e
@ -1141,7 +1141,7 @@ function StringRefCount(const S: RawByteString): SizeInt; overload;
|
||||
if assigned(Pointer(S)) then
|
||||
Result:=PAnsiRec(pointer(S)-AnsiFirstOff)^.Ref
|
||||
else
|
||||
Result:=SizeOf(AnsiChar);
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -2564,7 +2564,7 @@ function StringRefCount(const S: UnicodeString): SizeInt; overload;
|
||||
if assigned(Pointer(S)) then
|
||||
Result:=PUnicodeRec(pointer(S)-UnicodeFirstOff)^.Ref
|
||||
else
|
||||
Result:=SizeOf(UnicodeChar);
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user