diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2024-04-22 07:09:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-22 07:09:01 +0100 |
| commit | 73b5cba380d148e77d696880027a416cda50f756 (patch) | |
| tree | a642616d55c1d79ff9ef22e325c359947dbfbcf0 /libdraw/font.c | |
| parent | 22dd4b9c0961cd615779c72accc1e150357289cf (diff) | |
| parent | 1bf9388ccb3bd33b5825ee20ec6824b17508f045 (diff) | |
Merge pull request #16 from pete/multiple-small-fixes
Multiple small fixes
Diffstat (limited to 'libdraw/font.c')
| -rw-r--r-- | libdraw/font.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libdraw/font.c b/libdraw/font.c index f51804d2..849bb289 100644 --- a/libdraw/font.c +++ b/libdraw/font.c @@ -355,6 +355,8 @@ fontresize(Font *f, int wid, int ncache, int depth) d = f->display; if(depth <= 0) depth = 1; + if(wid == 0) + wid = 1; new = allocimage(d, Rect(0, 0, ncache*wid, f->height), CHAN1(CGrey, depth), 0, 0); if(new == nil){ |
