]> git.donarmstrong.com Git - lilypond.git/commit
This fixes an endless loop in duration.cc:67.
authorMichael Käppler <xmichael-k@web.de>
Sat, 28 Feb 2009 09:20:38 +0000 (10:20 +0100)
committerPatrick McCarty <pnorcks@gmail.com>
Fri, 17 Jul 2009 07:36:00 +0000 (00:36 -0700)
commit1c1b4428ca2e71b62c2c5ed3042e680dd1085926
tree682e42d934ffe00d041c185ff61acba5c28d8022
parente7b591e45e847f37be1562db730c378178f0b9b6
This fixes an endless loop in duration.cc:67.

The loop occurred when Duration::Duration(Rational r, bool scale) was called
with r.num() >= 2 * r.den(), f.e. the duration of a longa: r.num = 2,
r.den = 1. If k < 0, the left-shifting-operator << returns an undefined value
instead of right-shifting bits. The fix introduces a new function
shift_left() in misc.hh, which behaves different.
(cherry picked from commit 2a2eb61cf2f92967a1c6d5d872db1c906b2c2e73)
lily/duration.cc
lily/include/misc.hh