summaryrefslogtreecommitdiffstats
path: root/5/8.c
diff options
context:
space:
mode:
Diffstat (limited to '5/8.c')
-rw-r--r--5/8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/5/8.c b/5/8.c
index 9d376b1..5bcd213 100644
--- a/5/8.c
+++ b/5/8.c
@@ -37,13 +37,13 @@ void month_day(int year, int yearday, int *pmonth, int *pday) {
int i, leap;
if (year < 0) {
- *pmonth = *pday = 0;
+ *pmonth = *pday = -1;
printf("error: invalid year\n");
return;
}
if (yearday < 1) {
- *pmonth = *pday = 0;
+ *pmonth = *pday = -1;
printf("error: invalid yearday\n");
return;
}