Check pressure units in metric are not set to PSI

This commit is contained in:
Luke Butler
2023-03-16 16:21:55 -04:00
parent 4beebbd470
commit 6bc1efaf1c
2 changed files with 8 additions and 0 deletions

View File

@@ -1382,6 +1382,7 @@ int DLLEXPORT EN_setoption(EN_Project p, int option, double value)
unit = ROUND(value);
if (unit < 0 || unit > METERS) return 205;
if (p->parser.Unitsflag == US && unit > PSI) return 0;
if (p->parser.Unitsflag == SI && unit == PSI) return 0;
p->parser.Pressflag = unit;
initunits(p);
break;