Browse Source

fcl-db: base: initialize local variable to zero. Bug #30928

git-svn-id: trunk@34900 -
lacak 8 years ago
parent
commit
ae509ecd15
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/fcl-db/src/base/fields.inc

+ 4 - 3
packages/fcl-db/src/base/fields.inc

@@ -1631,12 +1631,13 @@ var L : Longint;
     P : PLongint;
 
 begin
+  L:=0;
   P:=@L;
   Result:=GetData(P);
   If Result then
-    Case Datatype of
-      ftInteger,ftAutoinc  : AValue:=Plongint(P)^;
-      ftWord               : AValue:=Pword(P)^;
+    Case DataType of
+      ftInteger,ftAutoInc  : AValue:=PLongint(P)^;
+      ftWord               : AValue:=PWord(P)^;
       ftSmallint           : AValue:=PSmallint(P)^;
     end;
 end;