Skip to content

Commit

Permalink
Avoid constructing a std::string with a nullptr in the SNDLL parser
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoticgd committed Oct 31, 2024
1 parent 794e844 commit cc2a4cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ccc/sndll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ static Result<SNDLLFile> parse_sndll_common(
SNDLLSymbol& symbol = sndll.symbols.emplace_back();
symbol.type = symbol_header->type;
symbol.value = symbol_header->value;
symbol.string = string;
if (string) {
symbol.string = string;
}
}

return sndll;
Expand Down

0 comments on commit cc2a4cd

Please sign in to comment.