Commit 392e395d authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Check table index for valid range.

parent 03c082b5
...@@ -949,6 +949,9 @@ int tableInqParUnits(int tableID, int code, char *units) ...@@ -949,6 +949,9 @@ int tableInqParUnits(int tableID, int code, char *units)
npars = parTable[tableID].npars; npars = parTable[tableID].npars;
if ( tableID >= 0 && tableID < MAX_TABLE ) { } else
Error("Invalid table ID %d", tableID);
if ( tableID == UNDEFID ) if ( tableID == UNDEFID )
{ {
err = 1; err = 1;
......
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