Commit 1add4007 authored by Morten Welinder's avatar Morten Welinder

Print: fix division by zero.

parent 0b2b1b4b
2015-05-27 Morten Welinder <terra@gnome.org>
* src/print.c (compute_scale_fit_to): Attempt a workaround for fp
division by zero. Fixes #749917.
* src/gnm-so-filled.c (gnm_so_filled_draw_cairo): Plug leak.
2015-05-16 Jean Brefort <jean.brefort@normalesup.org>
......
......@@ -17,7 +17,7 @@ Morten:
* Fuzzed file fixes. [#748595] [#748597] [#749031] [#749030]
[#749069] [#748533] [#749118] [#749166] [#749181] [#749184]
[#749236] [#749240] [#749234] [#749235] [#749271] [#749270]
[#749424]
[#749424] [#749917]
* Make solver check linearity of model.
* Fix xls saving of marker style. [#749185]
* Make compilation with clang work again. [#749138]
......
......@@ -821,8 +821,7 @@ compute_scale_fit_to (Sheet const *sheet,
/* We first calculate the max percentage needed */
max_p = (pages * usable)/(extent + pages * header);
if (max_p > max_percent)
max_p = max_percent;
max_p = CLAMP (max_p, 0.01, max_percent);
max_pages = paginate (NULL, sheet, start, end, usable/max_p - header,
repeat, repeat_start, repeat_end,
......@@ -834,8 +833,7 @@ compute_scale_fit_to (Sheet const *sheet,
/* The we calculate the min percentage */
min_p = usable/(extent + header);
if (min_p > max_percent)
min_p = max_percent;
min_p = CLAMP (min_p, 0.01, max_percent);
paginate (NULL, sheet, start, end, usable/min_p - header,
repeat, repeat_start, repeat_end,
......
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