mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
EXRAIL bugfix, protect RANDWAIT from division by zero. Triggered by DELAYRANDOM(X, X+99) or less diff
This commit is contained in:
parent
7c4640ad91
commit
ad6c1384c9
@ -750,7 +750,7 @@ void RMFT2::loop2() {
|
||||
break;
|
||||
|
||||
case OPCODE_RANDWAIT:
|
||||
delayMe((micros()%operand) *100L);
|
||||
delayMe(operand==0 ? 0 : (micros()%operand) *100L);
|
||||
break;
|
||||
|
||||
case OPCODE_RED:
|
||||
|
@ -1 +1 @@
|
||||
#define GITHUB_SHA "PORTX-HAL-20220830"
|
||||
#define GITHUB_SHA "PORTX-HAL-20220905"
|
||||
|
Loading…
Reference in New Issue
Block a user