From 18c8d1685cc19ef68f1619c72425c7e05225ab44 Mon Sep 17 00:00:00 2001 From: Ronald Wampler Date: Mon, 29 Oct 2018 15:00:56 -0400 Subject: [PATCH] Guard against an empty string --- Frameworks/version/src/version.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/version/src/version.cc b/Frameworks/version/src/version.cc index 4c98a3fd..614ad8bb 100644 --- a/Frameworks/version/src/version.cc +++ b/Frameworks/version/src/version.cc @@ -2,7 +2,7 @@ static bool is_numeric (std::string const& str) { - return str.find_first_not_of("0123456789") == std::string::npos; + return !str.empty() && str.find_first_not_of("0123456789") == std::string::npos; } static std::vector components (std::string const& str)