* patch by Frank Rademakers: Initialize new FoxPro Float fields correctly, resolves #39418

(cherry picked from commit 8ca19a3b65)
This commit is contained in:
florian 2021-10-27 21:19:34 +02:00 committed by marcoonthegit
parent ee9fba01ba
commit 7af4034db3

View File

@ -2341,7 +2341,8 @@ begin
TempFieldDef := FFieldDefs.Items[I];
// binary (non-text) field? (foxpro memo fields are binary, but dbase not)
if (TempFieldDef.NativeFieldType in ['I', 'O', '@', '+', '0', 'W', 'Y'])
or ((TempFieldDef.NativeFieldType = 'M') and (TempFieldDef.Size = 4) {Visual FoxPro?}) then
or ((TempFieldDef.NativeFieldType = 'M') and (TempFieldDef.Size = 4) {Visual FoxPro?})
or ((TempFieldDef.NativeFieldType = 'B') and (FDbfVersion in [xFoxPro, xVisualFoxPro])) then
FillChar(PChar(FDefaultBuffer+TempFieldDef.Offset)^, TempFieldDef.Size, 0);
// copy default value?
if TempFieldDef.HasDefault then