From: Reinhold Kainhofer Date: Fri, 30 Nov 2007 12:28:03 +0000 (+0100) Subject: MusicXML: Prevent negative duration logs (=> CRASH) X-Git-Tag: release/2.11.36-1~53^2^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bb4fc519338b35b6d2636dca6444263a9bc6a588;p=lilypond.git MusicXML: Prevent negative duration logs (=> CRASH) --- diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index c5e07c2ece..43dc29f7cb 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1190,7 +1190,7 @@ class LilyPondVoiceBuilder: duration_factor = 1 duration_log = {1: 0, 2: 1, 4:2, 8:3, 16:4, 32:5, 64:6, 128:7, 256:8, 512:9}.get (diff.denominator (), -1) duration_dots = 0 - if duration_log >= 0: # denominator is a power of 2... + if duration_log > 0: # denominator is a power of 2... if diff.numerator () == 3: duration_log -= 1 duration_dots = 1