fixes updates for win32gui
Changes to be committed: modified: doc/fixes36.0 modified: doc/fixes36.1 modified: win/win32/mhsplash.c modified: win/win32/mswproc.c
This commit is contained in:
@@ -1185,6 +1185,7 @@ win32gui: added menu options "Copy ASCII Screenshot To Clipboard" and "Save
|
||||
win32gui, win32tty: add support for looking for sysconf in %COMMONPROGRAMFILES%
|
||||
first and for user config file in %USERPROFILE% (improves support for
|
||||
multi-login Windows environments)
|
||||
win32gui: missing sys_early_init() call could result in "rnd(0) attempted"
|
||||
win32tty: support for 'selectsaved' option for menu of existing save files
|
||||
to choose from at game startup
|
||||
tty: add window port routines for saving/restoring message history
|
||||
|
||||
@@ -15,7 +15,8 @@ Platform- and/or Interface-Specific Fixes
|
||||
-----------------------------------------
|
||||
unix/X11: in top level Makefile, some commented out definitions of VARDATND
|
||||
misspelled pilemark.xbm (as pilemark.xpm)
|
||||
win32gui: missing sys_early_init() call could result in "rnd(0) attempted"
|
||||
win32gui: getversionstring() was overflowing the provided Help About buffer
|
||||
win32gui: guard against buffer overflow in in mswin_getlin()
|
||||
MacOSX: initial binary release was built from out of date source code that
|
||||
had 'BETA' and 'DEBUG' inappropriately enabled
|
||||
X11: core bug for '`' (backtick) command was only noticed by X11 interface,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mhsplash.c $NHDT-Date: 1432512813 2015/05/25 00:13:33 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ */
|
||||
/* NetHack 3.6 mhsplash.c $NHDT-Date: 1449751714 2015/12/10 12:48:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -94,11 +94,24 @@ mswin_display_splash_window(BOOL show_ver)
|
||||
if (show_ver) {
|
||||
/* Show complete version information */
|
||||
dlb *f;
|
||||
char verbuf[BUFSZ];
|
||||
int verstrsize = 0;
|
||||
|
||||
getversionstring(verbuf);
|
||||
verstrsize = strlen(verbuf);
|
||||
if (verstrsize + strlen("\r\n\r\n") + 1 < BUFSZ - 1)
|
||||
strcat(verbuf, "\r\n\r\n");
|
||||
verstrsize = strlen(verbuf);
|
||||
|
||||
getversionstring(buf + strsize);
|
||||
strcat(buf, "\r\n\r\n");
|
||||
if (strsize + verstrsize + 1 > bufsize) {
|
||||
bufsize += BUFSZ;
|
||||
buf = realloc(buf, bufsize);
|
||||
if (buf == NULL)
|
||||
panic("out of memory");
|
||||
}
|
||||
strcat(buf, verbuf);
|
||||
strsize = strlen(buf);
|
||||
|
||||
|
||||
/* Add compile options */
|
||||
f = dlb_fopen(OPTIONS_USED, RDTMODE);
|
||||
if (f) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449116670 2015/12/03 04:24:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.94 $ */
|
||||
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449751720 2015/12/10 12:48:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.95 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "func_tab.h" /* for extended commands */
|
||||
#include "winMS.h"
|
||||
#include <assert.h>
|
||||
#include <mmsystem.h>
|
||||
#include "mhmap.h"
|
||||
#include "mhstatus.h"
|
||||
#include "mhtext.h"
|
||||
@@ -1640,6 +1641,8 @@ mswin_getlin(const char *question, char *input)
|
||||
if (len > 0)
|
||||
len--;
|
||||
input[len] = '\0';
|
||||
} else if (len>=(BUFSZ-1)) {
|
||||
PlaySound((LPCSTR)SND_ALIAS_SYSTEMEXCLAMATION, NULL, SND_ALIAS_ID|SND_ASYNC);
|
||||
} else {
|
||||
input[len++] = c;
|
||||
input[len] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user