Properly parse args to MOON special

This commit is contained in:
Dianne Skoll
2022-09-15 18:37:46 -04:00
parent 17d6a60c0a
commit 0c6ab3e607

View File

@@ -645,7 +645,7 @@ SetMoonEntry(int jul, char const *moon)
}
msg[0] = 0;
if (sscanf(moon, "%d %*d %*d %31s", &phase, msg) < 4) {
if (sscanf(moon, "%d %*d %*d %31c", &phase, msg) < 4) {
if (sscanf(moon, "%d", &phase) != 1) {
/* Malformed MOON special; ignore */
fprintf(stderr, "Oops 1\n");