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: #45942
PR-URL: #47079
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
kvakil authored and targos committed Nov 10, 2023
1 parent 8a57182 commit 3552afb
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 @@ -227,8 +227,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 3552afb

Please sign in to comment.