Skip to content

Commit

Permalink
src: fix duplication of externalized builtin code
Browse files Browse the repository at this point in the history
The `else` here was missing, causing us to append the file to its
existing `source` already in the map.

Refs: nodejs#45942
  • Loading branch information
kvakil committed Mar 14, 2023
1 parent bcebb91 commit fd3252e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ void BuiltinLoader::AddExternalizedBuiltin(const char* id,
auto it = externalized_builtin_sources.find(id);
if (it != externalized_builtin_sources.end()) {
source = it->second;
}
{
} else {
int r = ReadFileSync(&source, filename);
if (r != 0) {
fprintf(stderr,
Expand Down

0 comments on commit fd3252e

Please sign in to comment.