浏览代码

* patch from mantis #12928 fixing precision of numeric type. FPC specific patch (but no effect on Delphi, so compat).

git-svn-id: trunk@18035 -
marco 14 年之前
父节点
当前提交
0976115115
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      packages/fcl-db/src/dbase/dbf.pas

+ 4 - 1
packages/fcl-db/src/dbase/dbf.pas

@@ -1040,7 +1040,10 @@ begin
       FieldDefs.Add(TempFieldDef.FieldName, TempFieldDef.FieldType, 0, false);
 
     if TempFieldDef.FieldType = ftFloat then
-      FieldDefs[I].Precision := TempFieldDef.Precision;
+      begin
+      FieldDefs[I].Size := 0;                      // Size is not defined for float-fields
+      FieldDefs[I].Precision := TempFieldDef.Size;
+      end;
 
 {$ifdef SUPPORT_FIELDDEF_ATTRIBUTES}
     // AutoInc fields are readonly