Browse Source

fcl-db: base: fix widestring copy #32215

git-svn-id: trunk@36812 -
lacak 8 years ago
parent
commit
301fc9af70
1 changed files with 2 additions and 19 deletions
  1. 2 19
      packages/fcl-db/src/base/dataset.inc

+ 2 - 19
packages/fcl-db/src/base/dataset.inc

@@ -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;