|
@ -195,7 +195,7 @@ namespace Heartbeat { |
|
|
// invalidate the whole string when invalid chars are detected
|
|
|
// invalidate the whole string when invalid chars are detected
|
|
|
char *value_endptr = nullptr; |
|
|
char *value_endptr = nullptr; |
|
|
const auto value = strtoul(cfg.c_str(), &value_endptr, 10); |
|
|
const auto value = strtoul(cfg.c_str(), &value_endptr, 10); |
|
|
if (value_endptr) { |
|
|
|
|
|
|
|
|
if (value_endptr == cfg.c_str() || value_endptr[0] != '\0') { |
|
|
return defaultValue(); |
|
|
return defaultValue(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|