summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@l3000.localdomain>2010-12-05 08:45:09 -0500
committerSøren Sandmann Pedersen <ssp@l3000.localdomain>2010-12-20 10:48:50 -0500
commitc3b021f2ae694fe3b91ceceb233badd15c29a45e (patch)
tree07fc95af39a5b1688e1e994ba19e27e19ab23959
parentc38be0bf970e34a05300d9b72d64e03e3e266d69 (diff)
Fix bug in next_sample_x
-rw-r--r--dda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dda.c b/dda.c
index 15c7b1c..6915d8b 100644
--- a/dda.c
+++ b/dda.c
@@ -21,7 +21,10 @@ next_sample_x (double x)
}
if (s > 1.0)
+ {
s -= 1.0;
+ i += 1;
+ }
return s + i;
}