Commit f217acad authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

zaxisCompare: check longname[0].

parent f53a8905
......@@ -902,17 +902,17 @@ bool zaxisCompare(int zaxisID, int zaxistype, int nlevels, bool lbounds, const d
if ( ! differ )
{
if ( longname )
if ( longname && longname[0] )
{
char zlongname[CDI_MAX_NAME];
char zlongname[CDI_MAX_NAME]; zlongname[0] = 0;
zaxisInqLongname(zaxisID, zlongname);
if ( zlongname[0] && strcmp(longname, zlongname) != 0 ) differ = true;
if ( zlongname[0] && (strcmp(longname, zlongname) != 0) ) differ = true;
}
if ( units )
if ( units && units[0] )
{
char zunits[CDI_MAX_NAME];
char zunits[CDI_MAX_NAME]; zunits[0] = 0;
zaxisInqUnits(zaxisID, zunits);
if ( zunits[0] && strcmp(units, zunits) != 0 ) differ = true;
if ( zunits[0] && (strcmp(units, zunits) != 0) ) differ = true;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment