Commit f62d6c17 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Fixed off-by-one in audio converters, when growing a data type's size.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403418
parent b96a3090
This diff is collapsed.
...@@ -188,8 +188,8 @@ EOF ...@@ -188,8 +188,8 @@ EOF
if ($fsize < $tsize) { if ($fsize < $tsize) {
my $mult = $tsize / $fsize; my $mult = $tsize / $fsize;
print <<EOF; print <<EOF;
src = (const $srctype *) (cvt->buf + cvt->len_cvt); src = ((const $srctype *) (cvt->buf + cvt->len_cvt)) - 1;
dst = ($tctype *) (cvt->buf + cvt->len_cvt * $mult); dst = (($tctype *) (cvt->buf + cvt->len_cvt * $mult)) - 1;
for (i = cvt->len_cvt / sizeof ($srctype); i; --i, --src, --dst) { for (i = cvt->len_cvt / sizeof ($srctype); i; --i, --src, --dst) {
EOF EOF
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment