mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Guard against an empty string
This commit is contained in:
committed by
Allan Odgaard
parent
bad84bd511
commit
18c8d1685c
@@ -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<std::string> components (std::string const& str)
|
||||
|
||||
Reference in New Issue
Block a user