Browse Source

* Avoid range-check error

git-svn-id: trunk@10236 -
joost 17 years ago
parent
commit
16ff4076ee
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/fcl-db/src/base/dsparams.inc

+ 2 - 1
packages/fcl-db/src/base/dsparams.inc

@@ -402,7 +402,8 @@ begin
       BufIndex:=ParamPart[i].Stop;
       BufIndex:=ParamPart[i].Stop;
     end;
     end;
     CopyLen:=Length(SQL)+1-BufIndex;
     CopyLen:=Length(SQL)+1-BufIndex;
-    Move(SQL[BufIndex],NewQuery[NewQueryIndex],CopyLen);
+    if CopyLen > 0 then
+      Move(SQL[BufIndex],NewQuery[NewQueryIndex],CopyLen);
   end
   end
   else
   else
     NewQuery:=SQL;
     NewQuery:=SQL;