diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2000-09-29 23:39:09 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2000-09-29 23:39:09 +0000 |
commit | 1515dc1cec7a7fa5b14f85a2ff80073c30f52ea4 (patch) | |
tree | ef6f7531a40042e3211b684ffd2480ef6cb1b7e0 /sys | |
parent | eba3d9a8c3da2513a04cfb6a6affc065435a25da (diff) |
Oops, time to learn how to count
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/isa/spkr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c index 7d09e5b4914..466c8d3e19f 100644 --- a/sys/dev/isa/spkr.c +++ b/sys/dev/isa/spkr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spkr.c,v 1.3 2000/09/29 23:23:38 miod Exp $ */ +/* $OpenBSD: spkr.c,v 1.4 2000/09/29 23:39:08 miod Exp $ */ /* $NetBSD: spkr.c,v 1.1 1998/04/15 20:26:18 drochner Exp $ */ /* @@ -172,7 +172,7 @@ playtone(pitch, value, sustain) if (pitch == -1) rest(whole * snum / (value * sdenom)); - else if (pitch >= 0 && pitch < sizeof(pitchtab)) + else if (pitch >= 0 && pitch < (sizeof(pitchtab) / sizeof(pitchtab[0]))) { sound = (whole * snum) / (value * sdenom) - (whole * (FILLTIME - fill)) / (value * FILLTIME); |