diff options
Diffstat (limited to '.bin/clock.c')
-rwxr-xr-x | .bin/clock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.bin/clock.c b/.bin/clock.c index 9fcd5ac9..d513fe75 100755 --- a/.bin/clock.c +++ b/.bin/clock.c @@ -15,7 +15,7 @@ int main() { if (!clock) err(EX_OSERR, "localtime"); int hour = clock->tm_hour; - int next = clock->tm_hour + 1; + int next = (hour + 1) % 24; switch ((clock->tm_min + 3) / 6) { case 0: printf("....%02d....\n", hour); break; |