wmstatus: fix noise adjustment logic
All checks were successful
Alpine 3.20 Success
OpenBSD 7.5 Success

It was possible to trigger an untracked playback stream.
This commit is contained in:
Přemysl Eric Janouch 2024-10-12 15:36:24 +02:00
parent d06beedcaa
commit bb4fdcd936
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -2249,7 +2249,7 @@ action_noise_adjust (struct app_context *ctx, const struct strv *args)
long arg = strtol (args->vector[0], NULL, 10);
ctx->noise_fadeout_samples = 0;
ctx->noise_fadeout_iterator = 0;
if (!ctx->noise_end_time && (arg < 0 || !noise_start (ctx)))
if (!ctx->noise_end_time && (arg <= 0 || !noise_start (ctx)))
return;
time_t now = time (NULL);