changeset 95307:7d02dd821410

(w32font_text_extents): Zero whole metrics struct first.
author Jason Rumney <jasonr@gnu.org>
date Mon, 26 May 2008 10:37:12 +0000
parents f341d5aaa71c
children 911183a4cdaa
files src/w32font.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32font.c	Mon May 26 06:57:48 2008 +0000
+++ b/src/w32font.c	Mon May 26 10:37:12 2008 +0000
@@ -358,10 +358,9 @@
     {
       struct w32font_info *w32_font = (struct w32font_info *) font;
 
-      metrics->width = 0;
+      bzero (metrics, sizeof (struct font_metrics));
       metrics->ascent = font->ascent;
       metrics->descent = font->descent;
-      metrics->lbearing = 0;
 
       for (i = 0; i < nglyphs; i++)
         {