File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,15 @@ about_info keychain_app::version_info::about()
4040
4141std::string keychain_app::version_info::version ()
4242{
43- static const std::regex VERSION_REGEXP (" ^\\ d+\\ .\\ d+\\ -\\ d+ " );
43+ static const std::regex VERSION_REGEXP (" ^\\ d+\\ .\\ d+( \\ -\\ d)* " );
4444 std::string description_string ( git_revision_description );
4545 auto it = std::sregex_iterator (description_string.begin (), description_string.end (), VERSION_REGEXP);
4646 if (it == std::sregex_iterator ())
4747 FC_LIGHT_THROW_EXCEPTION (fc_light::internal_error_exception, " Invalid version string has been returned by Git" );
4848 auto version_string = it->str ();
4949 auto replace_pos = version_string.find (' -' );
50- version_string[replace_pos] = ' .' ;
50+ if (replace_pos != std::string::npos)
51+ version_string[replace_pos] = ' .' ;
5152 return version_string;
5253}
5354
You can’t perform that action at this time.
0 commit comments