X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=settings.cpp;fp=settings.cpp;h=f50dcc454f9bd4680e13309fef5e869ba1b73926;hb=7085323d7027195567ae00e93279b717666180af;hp=c85bab4fba605a86d3c8a2450d9d9cd5ff9d00eb;hpb=264c99d57e1efbbf1ffabd76903b9168c57f0cfc;p=nssm.git diff --git a/settings.cpp b/settings.cpp index c85bab4..f50dcc4 100644 --- a/settings.cpp +++ b/settings.cpp @@ -452,7 +452,9 @@ static int setting_get_priority(const TCHAR *service_name, void *param, const TC unsigned long constant; switch (get_number(key, (TCHAR *) name, &constant, false)) { - case 0: return value_from_string(name, value, (const TCHAR *) default_value); + case 0: + if (value_from_string(name, value, (const TCHAR *) default_value) == -1) return -1; + return 0; case -1: return -1; }