From a8a60b29e679c33c8abbeb36875662a3dd26e4cb Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 30 Apr 2017 11:14:02 +0200 Subject: [PATCH] startup: warn about a strange character size only in the UTF-8 case This addresses https://savannah.gnu.org/bugs/?50897. Reported-by: Hannu Nyman --- src/nano.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nano.c b/src/nano.c index 63180b3b..155c057a 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2011,9 +2011,11 @@ int main(int argc, char **argv) textdomain(PACKAGE); #endif +#ifdef ENABLE_UTF8 if (MB_CUR_MAX > MAXCHARLEN) fprintf(stderr, "Unexpected large character size: %i bytes" " -- please report a bug\n", (int)MB_CUR_MAX); +#endif #if defined(DISABLE_NANORC) && defined(DISABLE_ROOTWRAPPING) /* If we don't have rcfile support, --disable-wrapping-as-root is