* tty.h (printwstr): If LEN is not positive, ignore the request.

This commit is contained in:
Roland Illig 2005-01-27 22:01:52 +00:00
parent ff6e206b42
commit ff3ca5ecb2

View File

@ -35,7 +35,8 @@ void mc_refresh (void);
/* print a string left-aligned, adjusted to exactly LEN characters */
static inline void printwstr (const char *s, int len)
{
printw("%-*.*s", len, len, s);
if (len > 0)
printw("%-*.*s", len, len, s);
}
#endif