lazbarcodes: Fix divide-by-zero error.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6138 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-01-16 11:18:34 +00:00
parent 3bb2efc107
commit 022167f11e

View File

@ -214,7 +214,10 @@ begin
end;
if large_bar_count = 0 then
begin
required_aspect := width / height;
if height = 0 then
required_aspect := 1.0
else
required_aspect := width / height;
symbol_aspect := (total_symbol_width_x + (2 * xoffset)) / (preset_height + (2 * yoffset) + text_offset + text_height);
symbol^.height := trunc(preset_height);
if required_aspect > symbol_aspect then