Skip to content

Commit

Permalink
Merge branch 'master' into cornu/remove_regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino authored Nov 10, 2023
2 parents 5ca689e + 9700e91 commit 59ed5ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ stages:

# Jobs to build OSX wheels natively
- job: 'MacOSWheels'
timeoutInMinutes: 45
timeoutInMinutes: 60
pool:
vmImage: 'macOS-11'
strategy:
Expand Down
6 changes: 5 additions & 1 deletion src/ivoc/ivocvect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,11 @@ static Object** v_mul(void* v1) {
static Object** v_div(void* v1) {
Vect* x = (Vect*) v1;
if (hoc_argtype(1) == NUMBER) {
std::for_each(x->begin(), x->end(), [](double& d) { d /= *getarg(1); });
if (*getarg(1) == 0.0) {
hoc_execerror("Vector", "Division by zero");
} else {
std::for_each(x->begin(), x->end(), [](double& d) { d /= *getarg(1); });
}
}
if (hoc_is_object_arg(1)) {
Vect* y = vector_arg(1);
Expand Down

0 comments on commit 59ed5ff

Please sign in to comment.