tlibdraw: Fix GUI programs on AIX (#398) - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit e9d8c4516847e3d8b36f384fb662b1a490f76f4e
(DIR) parent 6c4260fc670a71ae13587ff7da64518e5295777b
(HTM) Author: Ben Huntsman <ben@huntsmans.net>
Date: Sun, 29 Aug 2021 13:38:35 -0700
libdraw: Fix GUI programs on AIX (#398)
Diffstat:
M src/libdraw/string.c | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/src/libdraw/string.c b/src/libdraw/string.c
t@@ -81,7 +81,11 @@ _string(Image *dst, Point pt, Image *src, Point sp, Font *f, char *s, Rune *r, i
}else
rptr = &r;
sf = nil;
+#if defined(__AIX__)
+ while((*s || *rptr) && len){
+#else
while((*s || *r) && len){
+#endif
max = Max;
if(len < max)
max = len;