Closed ghost closed 4 years ago
Minecraft: 1.14.4 CC:T: 93a9ebc4f6b8c7c59151feffa1b5ab3996c016f5
Not a bug report per se; just found something sketchy in the code.
https://github.com/SquidDev-CC/CC-Tweaked/blob/mc-1.14.x/src/main/java/dan200/computercraft/core/computer/ComputerThread.java#L398
The else if clause here can never run because if afterHardAbort is >= ABORT_TIMEOUT * 2 then it must be >= ABORT_TIMEOUT, so the first if clause will always run, even if afterHardAbort is >= ABORT_TIMEOUT * 2.
afterHardAbort
ABORT_TIMEOUT * 2
ABORT_TIMEOUT
Yeah, that looks stupid. Wonder how that slipped through.
Minecraft: 1.14.4 CC:T: 93a9ebc4f6b8c7c59151feffa1b5ab3996c016f5
Not a bug report per se; just found something sketchy in the code.
https://github.com/SquidDev-CC/CC-Tweaked/blob/mc-1.14.x/src/main/java/dan200/computercraft/core/computer/ComputerThread.java#L398
The else if clause here can never run because if
afterHardAbort
is >=ABORT_TIMEOUT * 2
then it must be >=ABORT_TIMEOUT
, so the first if clause will always run, even ifafterHardAbort
is >=ABORT_TIMEOUT * 2
.