diff --git a/source/script/standardLibrary.c b/source/script/standardLibrary.c index 0f1816a..27efb02 100644 --- a/source/script/standardLibrary.c +++ b/source/script/standardLibrary.c @@ -457,7 +457,7 @@ ClassFunction(stdGetCwd){ } ClassFunction(stdPower){ - power_set_state(MIN(0, (getIntValue(args[0]) % POWER_OFF_REBOOT))); + power_set_state(MAX(0, (getIntValue(args[0]) % POWER_OFF_REBOOT))); return &emptyClass; } @@ -585,4 +585,4 @@ ClassFunctionTableEntry_t* searchStdLib(char* funcName, u8 *len) { *len = lenInternal; return ret; -} \ No newline at end of file +}