X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=settings.cpp;h=f50dcc454f9bd4680e13309fef5e869ba1b73926;hb=ac8cdc8a64606b7027344c8fd4d5f7f9bc871e90;hp=c85bab4fba605a86d3c8a2450d9d9cd5ff9d00eb;hpb=8835843825b95ec9597ea958055e55499e1aa1c9;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; }