Limit EN_STARTTIME parameter value to SECperDAY

Limit `EN_STARTTIME` parameter value to a maximum of `SECperDAY`, and
return an error code if this is exceeded.
This commit is contained in:
chrisgs
2020-03-23 22:14:02 +00:00
parent 21e1e4c019
commit 364ad08bcc

View File

@@ -1592,7 +1592,7 @@ int DLLEXPORT EN_settimeparam(EN_Project p, int param, long value)
break;
case EN_STARTTIME:
if (value < 0) return 213;
if (value < 0 || value > SECperDAY) return 213;
time->Tstart = value;
break;