From 7455748d5469a2ec07d85f3fbae10b285aefb703 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Thu, 13 Oct 2022 08:28:09 -0400 Subject: [PATCH] Eliminate compiler warning. --- src/calendar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calendar.c b/src/calendar.c index 3ff90144..b4604cc1 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -744,7 +744,7 @@ SetMoonEntry(int jul, char const *moon) { int phase; int y, m, d; - char msg[32]; + char msg[28]; /* Don't bother unless it's utf-8 */ if (!encoding_is_utf8) { @@ -752,7 +752,7 @@ SetMoonEntry(int jul, char const *moon) } msg[0] = 0; - if (sscanf(moon, "%d %*d %*d %31[^\x01]", &phase, msg) < 4) { + if (sscanf(moon, "%d %*d %*d %27[^\x01]", &phase, msg) < 4) { if (sscanf(moon, "%d", &phase) != 1) { /* Malformed MOON special; ignore */ fprintf(stderr, "Oops 1\n");