X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Foptimal-page-breaking.cc;h=4bcf05f8e49e71604b3f4d62229dac5470b98a2c;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=3bddcad4ba66815806fa1e691a2c2f229e1fc8f9;hpb=868b1b51b92cf47d25f4d3e91a838e976ba11eef;p=lilypond.git diff --git a/lily/optimal-page-breaking.cc b/lily/optimal-page-breaking.cc index 3bddcad4ba..4bcf05f8e4 100644 --- a/lily/optimal-page-breaking.cc +++ b/lily/optimal-page-breaking.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2012 Joe Neeman + Copyright (C) 2006--2015 Joe Neeman LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,7 +75,9 @@ Optimal_page_breaking::solve () if (page_count > 1 && best.systems_per_page_[page_count - 2] > 1) min_sys_count -= best.systems_per_page_[page_count - 2]; - min_sys_count = max (min_sys_count, (vsize)1); + if (min_sys_count > ideal_sys_count // subtraction wrapped around + || min_sys_count <= 0) + min_sys_count = 1; } } else