* unicode fix in TInputLine.Init

git-svn-id: branches/unicodekvm@48616 -
This commit is contained in:
nickysn 2021-02-10 16:17:56 +00:00
parent 6e845e397f
commit 1d0ec1b966

View File

@ -1324,10 +1324,14 @@ BEGIN
State := State OR sfCursorVis; { Cursor visible }
Options := Options OR (ofSelectable + ofFirstClick
+ ofVersion20); { Set options }
{$ifdef FV_UNICODE}
Data := ''; { Data = empty string }
{$else FV_UNICODE}
If (MaxAvail > AMaxLen + 1) Then Begin { Check enough memory }
GetMem(Data, AMaxLen + 1); { Allocate memory }
Data^ := ''; { Data = empty string }
End;
{$endif FV_UNICODE}
MaxLen := AMaxLen; { Hold maximum length }
END;