aboutsummaryrefslogtreecommitdiff
path: root/src/scalar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scalar.c')
-rw-r--r--src/scalar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/scalar.c b/src/scalar.c
index 4ae3f16..0e3578f 100644
--- a/src/scalar.c
+++ b/src/scalar.c
@@ -992,6 +992,11 @@ int xtract_midicent(const double *data, const int N, const void *argv, double *r
note *= 100;
note = round(note);
+ if (note > 12700 || note < 0)
+ {
+ return XTRACT_ARGUMENT_ERROR;
+ }
+
return XTRACT_SUCCESS;
}