Skip to content
Snippets Groups Projects
Commit 66a72b63 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Add tableID check to tableInqPar.

parent 1f70cc85
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment