]> granicus.if.org Git - postgis/commitdiff
Accept "0" as a null DBF date value.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 1 Jun 2010 20:00:05 +0000 (20:00 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 1 Jun 2010 20:00:05 +0000 (20:00 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/1.4@5667 b70326c6-7e19-0410-871a-916f4a2858ee

loader/dbfopen.c

index 9d0ab9eb8103aae61460cf5e6e80764aa6f44d36..8af4c917c12e58727263a7107798440051224cce 100644 (file)
@@ -975,7 +975,7 @@ DBFIsAttributeNULL( DBFHandle psDBF, int iRecord, int iField )
 
        case 'D':
                /* NULL date fields have value "00000000" */
-               return (strncmp(pszValue,"00000000",8) == 0 || strlen(pszValue) == 0);
+               return (strncmp(pszValue,"0",1) == 0 || strncmp(pszValue,"00000000",8) == 0 || strlen(pszValue) == 0);
 
        case 'L':
                /* NULL boolean fields have value "?" */