From ff3ca5ecb22b9e4a7be7bc2f5351b60ef2e79a88 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Thu, 27 Jan 2005 22:01:52 +0000 Subject: [PATCH] * tty.h (printwstr): If LEN is not positive, ignore the request. --- src/tty.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tty.h b/src/tty.h index 8ad1979d7..11f36f138 100644 --- a/src/tty.h +++ b/src/tty.h @@ -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