fix: check `tr_num_parse` result in daemon (#7181)

This commit is contained in:
Yat Ho 2024-10-21 12:52:52 +08:00 committed by GitHub
parent a8bf44eeb1
commit 819d7f4136
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -603,7 +603,7 @@ bool tr_daemon::parse_args(int argc, char const* const* argv, bool* dump_setting
break;
case 953:
if (auto const ratio_limit = tr_num_parse<double>(optstr); optstr)
if (auto const ratio_limit = tr_num_parse<double>(optstr); ratio_limit)
{
tr_variantDictAddReal(&settings_, TR_KEY_ratio_limit, *ratio_limit);
}