Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Jan 30, 2023
1 parent 9009929 commit 62ceafe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/ivoc/strfun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static double l_head(void*) {
hoc_assign_str(head, buf.c_str());
} else {
hoc_assign_str(head, "");
i = -1;
}
hoc_return_type_code = 1; // integer
return double(i);
Expand All @@ -72,6 +73,7 @@ static double l_tail(void*) {
hoc_assign_str(tail, buf.c_str());
} else {
hoc_assign_str(tail, "");
i = -1;
}
hoc_return_type_code = 1; // integer
return double(i);
Expand Down
12 changes: 6 additions & 6 deletions src/nrncvode/netcvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ Object** NetCvode::netconlist() {
try {
spost = std::regex(escape_bracket(s.data()));
} catch (std::regex_error& e) {
hoc_execerror(gargstr(1), "not a valid regular expression");
hoc_execerror(gargstr(2), "not a valid regular expression");
}
}
}
Expand All @@ -972,7 +972,7 @@ Object** NetCvode::netconlist() {
try {
star = std::regex(escape_bracket(s.data()));
} catch (std::regex_error& e) {
hoc_execerror(gargstr(1), "not a valid regular expression");
hoc_execerror(gargstr(3), "not a valid regular expression");
}
}
}
Expand All @@ -988,15 +988,15 @@ Object** NetCvode::netconlist() {
b = precell == opre;
} else {
std::string s(hoc_object_name(precell));
b = std::regex_match(s, spre);
b = std::regex_search(s, spre);
}
} else if (ps->osrc_) {
Object* presyn = ps->osrc_;
if (opre) {
b = presyn == opre;
} else {
std::string s(hoc_object_name(presyn));
b = std::regex_match(s, spre);
b = std::regex_search(s, spre);
}
}
if (b) {
Expand All @@ -1014,14 +1014,14 @@ Object** NetCvode::netconlist() {
b = postcell == opost;
} else {
std::string s(hoc_object_name(postcell));
b = std::regex_match(s, spost);
b = std::regex_search(s, spost);
}
if (b) {
if (otar) {
b = target == otar;
} else {
std::string s(hoc_object_name(target));
b = std::regex_match(s, star);
b = std::regex_search(s, star);
}
if (b) {
o->append(d->obj_);
Expand Down

0 comments on commit 62ceafe

Please sign in to comment.