yellowfeather / DbfDataReader

DbfDataReader is a small fast .Net Core library for reading dBase, xBase, Clipper and FoxPro database files
MIT License
134 stars 61 forks source link

Negative Currency Values #62

Closed afesse-cs closed 3 years ago

afesse-cs commented 4 years ago

Negative currency values are not read correctly. In the attached sample file, all negative values will read 1844674000000000M.

I was able to fix by updating DbfValueCurrency.cs:

            var value = BitConverter.ToUInt64(bytes, 0);

to

            var value = BitConverter.ToInt64(bytes, 0);
afesse-cs commented 4 years ago

foxpro_currency_01.zip