projects
/
inferno
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e427b1
)
Fix a crash in libdraw; I think this came from qrstuv.
author
Pete
<pete@debu.gs>
Thu, 2 Nov 2023 17:47:39 +0000
(10:47 -0700)
committer
Pete
<pete@debu.gs>
Thu, 2 Nov 2023 18:00:18 +0000
(11:00 -0700)
libdraw/font.c
patch
|
blob
|
history
diff --git
a/libdraw/font.c
b/libdraw/font.c
index f51804d21f95c62e4ff1dbb71f5df926d7f99e97..849bb2890f3e74bbcb24e024cc3562792a45c496 100644
(file)
--- 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){