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

vlistInqVarCode: cleanup

parent f5e87021
...@@ -407,7 +407,8 @@ int vlistInqVarCode(int vlistID, int varID) ...@@ -407,7 +407,8 @@ int vlistInqVarCode(int vlistID, int varID)
int param = vlistptr->vars[varID].param; int param = vlistptr->vars[varID].param;
int pdis, pcat, pnum; int pdis, pcat, pnum;
cdiDecodeParam(param, &pnum, &pcat, &pdis); cdiDecodeParam(param, &pnum, &pcat, &pdis);
int code = pdis == 255 ? pnum : -varID-1; int code = pnum;
if ( pdis != 255 ) code = -varID-1; // GRIB2 Parameter
if ( code < 0 && vlistptr->vars[varID].tableID != -1 && vlistptr->vars[varID].name != NULL ) if ( code < 0 && vlistptr->vars[varID].tableID != -1 && vlistptr->vars[varID].name != NULL )
{ {
......
Supports Markdown
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