diff options
author | rsc <devnull@localhost> | 2004-04-25 20:26:27 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-25 20:26:27 +0000 |
commit | 4e206880423db866dd1db0622a9b4d5b0881fee1 (patch) | |
tree | c4a2b577708093741962ca07a0ffcb8cf14ce6cc /src/libdraw/stringwidth.c | |
parent | a2c2caaafe37e119078bc88f6ebee6d338cbff46 (diff) | |
download | plan9port-4e206880423db866dd1db0622a9b4d5b0881fee1.tar.gz plan9port-4e206880423db866dd1db0622a9b4d5b0881fee1.tar.bz2 plan9port-4e206880423db866dd1db0622a9b4d5b0881fee1.zip |
make it possible to access fonts without a display.
Diffstat (limited to 'src/libdraw/stringwidth.c')
-rw-r--r-- | src/libdraw/stringwidth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libdraw/stringwidth.c b/src/libdraw/stringwidth.c index f0d13721..8d8c6d08 100644 --- a/src/libdraw/stringwidth.c +++ b/src/libdraw/stringwidth.c @@ -25,7 +25,7 @@ _stringnwidth(Font *f, char *s, Rune *r, int len) }else rptr = &r; twid = 0; - while(len && (*s || *r)){ + while(len>0 && (*s || *r)){ max = Max; if(len < max) max = len; |