]> granicus.if.org Git - postgis/commitdiff
Accept "0" as a null value for Date types.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 1 Jun 2010 19:58:17 +0000 (19:58 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 1 Jun 2010 19:58:17 +0000 (19:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5665 b70326c6-7e19-0410-871a-916f4a2858ee

loader/dbfopen.c

index 45fe07761c8f4329b942d33e61afbe9c4cad73f3..7d8ffedb65e0f595d6803b936c57eef40c721531 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) || strncmp(pszValue,"00000000",8) == 0 || strlen(pszValue) == 0);
 
        case 'L':
                /* NULL boolean fields have value "?" */