Skip to content

Commit

Permalink
Fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Dec 16, 2024
1 parent 84e629f commit e9bdbd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/oc/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ static void hoc_load(const char* stype) {
++i;
const Symbol* sym = hoc_lookup(s);
if (!sym || sym->type == UNDEF) {
auto file = search_hoc_files_regex(std::regex("^(func|proc|begintemplate)"),
default_search_paths());
auto pattern = std::regex(fmt::format("^{} {}", stype, s));
auto file = search_hoc_files_regex(pattern, default_search_paths());
if (file) {
fprintf(stderr, "Getting %s from %s\n", s, file->c_str());
hoc_Load_file(0, file->c_str());
Expand Down

0 comments on commit e9bdbd1

Please sign in to comment.