aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pj_gridinfo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c
index 3d34dd7e..d7390847 100644
--- a/src/pj_gridinfo.c
+++ b/src/pj_gridinfo.c
@@ -397,7 +397,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
/* Seek a parent grid file by name from a grid list */
/************************************************************************/
-static PJ_GRIDINFO* pj_gridinfo_parent( PJ_GRIDINFO *gilist,
+static PJ_GRIDINFO* pj_gridinfo_parent( PJ_GRIDINFO *gilist,
const char *name, int length )
{
while( gilist )
@@ -863,6 +863,9 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
return gilist;
}
+ /* some files may be smaller that sizeof(header), eg 160, so */
+ ctx->last_errno = 0; /* don't treat as a persistent error */
+
pj_ctx_fseek( ctx, fp, SEEK_SET, 0 );
/* -------------------------------------------------------------------- */