Merge pull request #710 from lbutler/fix-time-control-input-tokens

Fixes incorrect hour set with >9 input tokens for simple controls
This commit is contained in:
Lew Rossman
2023-02-18 11:45:55 -05:00
committed by GitHub

View File

@@ -922,7 +922,7 @@ int controldata(Project *pr)
case TIMER:
case TIMEOFDAY:
if (n == 6) time = hour(parser->Tok[5], "");
if (n == 7) time = hour(parser->Tok[5], parser->Tok[6]);
if (n >= 7) time = hour(parser->Tok[5], parser->Tok[6]);
if (time < 0.0) return setError(parser, 5, 213);
break;
case LOWLEVEL: