]> granicus.if.org Git - nethack/commitdiff
more version buf
authornhmall <nhmall@nethack.org>
Thu, 12 May 2022 23:56:16 +0000 (19:56 -0400)
committernhmall <nhmall@nethack.org>
Thu, 12 May 2022 23:56:16 +0000 (19:56 -0400)
src/files.c
src/windows.c
win/win32/mhmain.c
win/win32/mhsplash.c

index 38429c6da353f7faff70f7b34bd09d0d5cd45d0b..8032b52b04dc1b7f1bf7cc27251bb527ce842558 100644 (file)
@@ -3637,7 +3637,8 @@ paniclog(const char *type,   /* panic, impossible, trickery */
             char playmode = wizard ? 'D' : discover ? 'X' : '-';
 
             (void) fprintf(lfile, "%s %08ld %06ld %d %c: %s %s\n",
-                           version_string(buf), yyyymmdd(now), hhmmss(now),
+                           version_string(buf, sizeof buf),
+                           yyyymmdd(now), hhmmss(now),
                            uid, playmode, type, reason);
 #endif /* !PANICLOG_FMT2 */
             (void) fclose(lfile);
index bd2ab4c1c565698ebf780c434c3e1c1c2cffb71a..c0b680c3759ac355582c37619d5e6113254e51dc 100644 (file)
@@ -1141,7 +1141,7 @@ dump_fmtstr(const char *fmt, char *buf,
                     Strcpy(tmpbuf, "{current date+time}");
                 break;
             case 'v': /* version, eg. "3.7.0-0" */
-                Sprintf(tmpbuf, "%s", version_string(verbuf));
+                Sprintf(tmpbuf, "%s", version_string(verbuf, sizeof verbuf));
                 break;
             case 'u': /* UID */
                 Sprintf(tmpbuf, "%ld", uid);
index 51d00cb15c6ed486247ee2a385bfc8fb5e219ab1..8fe66cd6f1f1ae3369fa280d119c00ab73f1ffe6 100644 (file)
@@ -1061,7 +1061,7 @@ About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
     switch (message) {
     case WM_INITDIALOG:
-        getversionstring(buf);
+        getversionstring(buf, sizeof buf);
         SetDlgItemText(hDlg, IDC_ABOUT_VERSION,
                        NH_A2W(buf, wbuf, sizeof(wbuf)));
 
index e3c8796cc94d4b1ac8adeb11981d0b9778c19374..7e9ab2dca53645be54e08f7b3f27a10e64fd9883 100644 (file)
@@ -153,7 +153,7 @@ mswin_display_splash_window(BOOL show_ver)
         char verbuf[BUFSZ];
         /* int verstrsize = 0; */
 
-        getversionstring(verbuf);
+        getversionstring(verbuf, sizeof verbuf);
         strbuf_append(&strbuf, verbuf);
         strbuf_append(&strbuf, "\n\n");