git://git.jankratochvil.net
/
timeplan.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed check failing on January - it is 0..11, not 1..12 as I previously thought.
[timeplan.git]
/
timeplan.c
diff --git
a/timeplan.c
b/timeplan.c
index
f710be7
..
62ee68f
100644
(file)
--- a/
timeplan.c
+++ b/
timeplan.c
@@
-693,7
+693,7
@@
const char *days[]={"Ne","Po","Ut","St","Ct","Pa","So"};
t=mktime(&tm);
if (t==-1 || tm.tm_wday<0 || tm.tm_wday>6
|| tm.tm_mday<1 || tm.tm_mday>31
t=mktime(&tm);
if (t==-1 || tm.tm_wday<0 || tm.tm_wday>6
|| tm.tm_mday<1 || tm.tm_mday>31
- || tm.tm_mon <
1 || tm.tm_mon >12
+ || tm.tm_mon <
0 || tm.tm_mon >11
|| tm.tm_year<80 || tm.tm_year>150
) {
fprintf(ERRH1"Incorrect timestamp \"%s\""WHERE1,ERRH2,buf,WHERE2);
|| tm.tm_year<80 || tm.tm_year>150
) {
fprintf(ERRH1"Incorrect timestamp \"%s\""WHERE1,ERRH2,buf,WHERE2);