Commit 66a72b63 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add tableID check to tableInqPar.

parent 1f70cc85
......@@ -958,11 +958,13 @@ int tableInqParUnits(int tableID, int code, char *units)
void tableInqPar(int tableID, int code, char *name, char *longname, char *units)
{
int item, npars;
npars = parTable[tableID].npars;
if ( ((tableID >= 0) & (tableID < MAX_TABLE)) | (tableID == UNDEFID) ) { } else
Error("Invalid table ID %d", tableID);
for ( item = 0; item < npars; item++ )
int npars = parTable[tableID].npars;
for ( int item = 0; item < npars; item++ )
{
if ( parTable[tableID].pars[item].id == code )
{
......
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