Skip to content

Commit

Permalink
properly check for empty string in parseStabString
Browse files Browse the repository at this point in the history
* fix bug in code that checked for empty std::string by checking the
  first char of the string being null
  • Loading branch information
kupsch committed Oct 21, 2020
1 parent 30e8e38 commit fd520f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion symtabAPI/src/parseStab.C
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ std::string Dyninst::SymtabAPI::parseStabString(Module *mod, int linenum, char *
currentRawSymbolName = mangledname;
std::string name = P_cplus_demangle( mangledname );

if ( name[0] != '\0' && stabstr[cnt] != ':' )
if ( !name.empty() && stabstr[cnt] != ':' )
{
types_printf("\t returning name %s\n", name.c_str());
return name;
Expand Down

0 comments on commit fd520f7

Please sign in to comment.