diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-24 23:57:12 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-24 23:57:12 +0000 |
commit | 03e46a6366485a0127ba004bb62f770f1d88344a (patch) | |
tree | 5416c18231f4c57e45c73780098d75acc684e6ad | |
parent | e409103ea056164225d60b7143d4d2fb3a88353e (diff) |
correct check for the size of semitones
credit to Yichen Xie's bounds checker
ok mickey@
-rw-r--r-- | sys/dev/midisyn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/midisyn.c b/sys/dev/midisyn.c index c7fc39935b3..b9a16aaa645 100644 --- a/sys/dev/midisyn.c +++ b/sys/dev/midisyn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midisyn.c,v 1.3 2002/03/14 03:16:03 millert Exp $ */ +/* $OpenBSD: midisyn.c,v 1.4 2003/02/24 23:57:11 tedu Exp $ */ /* $NetBSD: midisyn.c,v 1.5 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -413,8 +413,8 @@ midisyn_finetune(base_freq, bend, range, vibrato_cents) } semitones = bend / 100; - if (semitones > 99) - semitones = 99; + if (semitones > 23) + semitones = 23; cents = bend % 100; amount = semitone_tuning[semitones] * multiplier * cent_tuning[cents] |