OSGeo / shapelib

Official repository of shapelib
Other
141 stars 66 forks source link

Fix API inconsistency of NULL Date #136

Closed thbeu closed 4 months ago

thbeu commented 4 months ago

It is possible to write a NULL Date by DBFWriteNULLAttribute where a subsequent call to DBFIsAttributeNULL returns false due to handling only "0" and "00000000" as valid NULL Date strings. This is fixed by writing NULL Date independently of the field width.

Edit: There are other fixes possible, e.g. for width of 1 and 8 to be more backward-compatible w.r.t. binary content or by considering the field width when reading the Null string.