player/main: don't use atoi

Prevents UB if the value cannot be represented.
This commit is contained in:
nanahi authored and Kacper Michajłow committed 2026-04-17 04:09:23 +02:00
1 parent da2739f44f
commit b20a33287b
1 file changed
+1 -1
+1 -1
View File
@@ -321,7 +321,7 @@ struct MPContext *mp_create(void)
char *verbose_env = getenv("MPV_VERBOSE");
if (verbose_env)
mpctx->opts->verbose = atoi(verbose_env);
mpctx->opts->verbose = strtol(verbose_env, NULL, 10);
mp_cancel_trigger(mpctx->playback_abort);