Sitelet https://github.com/NetHack/NetHack/issues/1675
Skip to content

Possible revival of bug W343-3 on Windows prior to version 8 #1675

Description

@chasonr

Commit #19d8ec6 changes this line in sys/windows/consoletty.c

console.has_unicode = ((GetVersion() & 0x80000000) == 0);

to read

console.has_unicode = (IsWindows8OrGreater());

This changes the meaning of the test. GetVersion returns bit 31 set when running on Windows 95, 98 or Me. These versions of Windows do not support WriteConsoleOutputCharacterW, and also do not exhibit bug W343-3. Windows NT and its descendants should call WriteConsoleOutputCharacterW to work around that bug.

As changed, I expect that NetHack won't run at all on Windows 95 and its descendants, and that W343-3 will appear once more on Windows 7 and earlier.

The post to RGRN in which I described the bug is dated 5 November 2005, in the time of Windows XP. So the workaround is both necessary and effective for that version.

NetHack may be broken on Windows 95 for other reasons.

If support for Windows 95 is still desired, this change should be reverted. If not, the test should be removed and WriteConsoleOutputCharacterW should always be alled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions