Ignore:
Timestamp:
Nov 8, 1999, 3:12:44 PM (26 years ago)
Author:
phaller
Message:

Fix: if obtaining font information fails, prevent division by zero

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/edit.cpp

    r1550 r1637  
    1 /* $Id: edit.cpp,v 1.10 1999-11-02 19:13:00 sandervl Exp $ */
     1/* $Id: edit.cpp,v 1.11 1999-11-08 14:12:44 phaller Exp $ */
    22/*
    33 *      Edit control
     
    34853485        GetTextMetricsA(dc, &tm);
    34863486        es->line_height = tm.tmHeight;
     3487
     3488        //@@@PH 1999/11/08 prevent division by zero
     3489        if (es->line_height == 0)
     3490          es->line_height = 12; // reasonable default?
     3491
    34873492        es->char_width = tm.tmAveCharWidth;
    34883493        if (font)
Note: See TracChangeset for help on using the changeset viewer.