Enabling an already enabled timer has no effect anymore.
[INTERPRETER] * BUG: Enabling an already enabled timer has no effect anymore.
This commit is contained in:
parent
b737880ee6
commit
68c503bc2e
1 changed files with 2 additions and 1 deletions
|
@ -41,6 +41,7 @@ static void enable_timer(CTIMER *_object, bool on)
|
|||
{
|
||||
if (on != (THIS->id != 0))
|
||||
HOOK_DEFAULT(timer, WATCH_timer)((GB_TIMER *)THIS, on);
|
||||
|
||||
if (on && (THIS->id == 0))
|
||||
GB_Error("Too many active timers");
|
||||
}
|
||||
|
@ -128,7 +129,7 @@ BEGIN_PROPERTY(Timer_Enabled)
|
|||
if (READ_PROPERTY)
|
||||
GB_ReturnBoolean(THIS->id != 0);
|
||||
else
|
||||
enable_timer(THIS, VPROP(GB_BOOLEAN));
|
||||
enable_timer(THIS, !!VPROP(GB_BOOLEAN));
|
||||
|
||||
END_PROPERTY
|
||||
|
||||
|
|
Loading…
Reference in a new issue