aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/haiku_font_support.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/haiku_font_support.cc b/src/haiku_font_support.cc
index 3930cd965f6..549c54d8649 100644
--- a/src/haiku_font_support.cc
+++ b/src/haiku_font_support.cc
@@ -68,7 +68,11 @@ estimate_font_ascii (BFont *font, int *max_width,
68 68
69 *min_width = min; 69 *min_width = min;
70 *max_width = max; 70 *max_width = max;
71 *avg_width = total / count; 71
72 if (count)
73 *avg_width = total / count;
74 else
75 *avg_width = 0;
72} 76}
73 77
74void 78void