Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API inconsistency of NULL Date #136

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Conversation

thbeu
Copy link
Contributor

@thbeu thbeu commented Jul 15, 2024

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.

@thbeu thbeu changed the title Fix API inconsitency of NULL Date Fix API inconsistency of NULL Date Jul 15, 2024
dbfopen.c Outdated Show resolved Hide resolved
@thbeu thbeu requested a review from rouault July 15, 2024 20:12
@rouault rouault merged commit 917d21e into OSGeo:master Jul 15, 2024
6 checks passed
@thbeu thbeu deleted the fix-date-null branch July 15, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants