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 Mar 18, 2023
1 parent 5a43586 commit 2fd0f79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_builtins.cc
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 2fd0f79

Please sign in to comment.