Foxpro: Not a database file.

After a crash, Foxpro complained that a dbf was not a database file. Turns out this was due to an incorrect record count in the .dbf header. Bytes 04-07 in the header contain the record count and it seems that if this does not match the expected file size Foxpro complains. Calculate the correct record ...