changeset 277:1bbdd13ec585

UltraRogue: fix Y2K bug on tombstone. Years were being displayed as "191XX" instead of "20XX".
author John "Elwin" Edwards
date Mon, 11 Sep 2017 17:46:42 -0400
parents 4573b355cdc1
children 4a3f4729257c
files urogue/rip.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/urogue/rip.c	Sun Sep 10 21:04:22 2017 -0400
+++ b/urogue/rip.c	Mon Sep 11 17:46:42 2017 -0400
@@ -169,7 +169,7 @@
     mvaddstr(15, 28 - ((int)(strlen(buf) + 1) / 2), buf);
     killer = killname(monst,buf);
     mvaddstr(17, 28 - ((int)(strlen(killer) + 1) / 2), killer);
-    mvaddstr(18, 28, (sprintf(prbuf, "%2d", lt->tm_year), prbuf));
+    mvaddstr(18, 26, (sprintf(prbuf, "%4d", 1900+lt->tm_year), prbuf));
     move(LINES - 1, 0);
 
     mvaddstr(LINES - 1, 0, retstr);