more version buf

This commit is contained in:
nhmall
2022-05-12 19:56:16 -04:00
parent fe5cb1011f
commit f8b8495144
4 changed files with 5 additions and 4 deletions

View 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);

View 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);

View 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)));

View 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");