Browse Source

* unicode fixes in TInputLine.DataSize

git-svn-id: branches/unicodekvm@48618 -
nickysn 4 years ago
parent
commit
1a643e250a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/fv/src/dialogs.inc

+ 6 - 0
packages/fv/src/dialogs.inc

@@ -1380,9 +1380,15 @@ FUNCTION TInputLine.DataSize: Sw_Word;
 VAR DSize: Sw_Word;
 BEGIN
    DSize := 0;                                        { Preset zero datasize }
+{$ifdef FV_UNICODE}
+   If (Validator <> Nil) AND (Data <> '') Then
+     DSize := Validator^.Transfer(Data, Nil,
+       vtDataSize);                                   { Add validator size }
+{$else FV_UNICODE}
    If (Validator <> Nil) AND (Data <> Nil) Then
      DSize := Validator^.Transfer(Data^, Nil,
        vtDataSize);                                   { Add validator size }
+{$endif FV_UNICODE}
    If (DSize <> 0) Then DataSize := DSize             { Use validtor size }
      Else DataSize := MaxLen + 1;                     { No validator use size }
 END;