fcl-db: base: fix widestring copy #32215

git-svn-id: trunk@36812 -
This commit is contained in:
lacak 2017-07-28 19:04:28 +00:00
parent 4a588fcbc2
commit 301fc9af70

View File

@ -542,23 +542,6 @@ end;
procedure TDataSet.DataConvert(aField: TField; aSource, aDest: Pointer;
aToNative: Boolean);
// There seems to be no WStrCopy defined, this is a copy of
// the generic StrCopy function, adapted for WideChar.
Function WStrCopy(Dest, Source:PWideChar): PWideChar;
var
counter : SizeInt;
Begin
counter := 0;
while Source[counter] <> #0 do
begin
Dest[counter] := char(Source[counter]);
Inc(counter);
end;
{ terminate the string }
Dest[counter] := #0;
WStrCopy := Dest;
end;
var
DT : TFieldType;
@ -574,7 +557,7 @@ begin
// See notes from mantis bug-report 8204 for more information
// ftBytes : ;
// ftVarBytes : ;
ftWideString : WStrCopy(PWideChar(aDest), PWideChar(aSource));
ftWideString : StrCopy(PWideChar(aDest), PWideChar(aSource));
end
end
else
@ -586,7 +569,7 @@ begin
ftFMTBCD : TBcd(aDest^) := TBcd(aSource^);
// ftBytes : ;
// ftVarBytes : ;
ftWideString : WStrCopy(PWideChar(aDest), PWideChar(aSource));
ftWideString : StrCopy(PWideChar(aDest), PWideChar(aSource));
end
end
end;