comparison th_args.c @ 633:e3c4d8e28695

Adjust options help width check, it was off-by-one.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 20 Jan 2020 17:02:06 +0200
parents 6d99150a8f89
children c09b068ecb32
comparison
equal deleted inserted replaced
632:553db886533e 633:e3c4d8e28695
220 str[next] && !th_isspace(str[next]) && 220 str[next] && !th_isspace(str[next]) &&
221 str[next] != '\n'; 221 str[next] != '\n';
222 next++, wlen++); 222 next++, wlen++);
223 223
224 // Check if we have too much of text? 224 // Check if we have too much of text?
225 if (linelen + wlen >= width) 225 if (linelen + wlen > width)
226 break; 226 break;
227 227
228 // Print what we have 228 // Print what we have
229 for (;pos < next; pos++, linelen++) 229 for (;pos < next; pos++, linelen++)
230 fputc(str[pos], fh); 230 fputc(str[pos], fh);