bug-xboard
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-XBoard] [bug #34990] Use of Mono mode once permanently swictces


From: Byrial Jensen
Subject: Re: [Bug-XBoard] [bug #34990] Use of Mono mode once permanently swictces to bitmap pieces
Date: Wed, 21 Dec 2011 23:00:17 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15

Den 21-12-2011 22:33, h.g. muller skrev:

The only way to
revert this is to quit xboard and manually edit .xboardrc to remove the
automatically inserted -bitmapDirectory option.

This is not true: the bitmapDirectory can be specified from the View->Board
menu dialog as well.

You are right about that. However when I tried I got a segfault!

A string constant (DEF_BITMAP_DIR) is assigned to appData.bitmapDirectory when you change to monoMode if it was NULL.

So when I try to change bitmap directory later DEF_BITMAP_DIR is attempted free()'ed, and xboard crashes.

Add a strdup() at xboard.c:1946.

Switching to modo-mode does force it to a default
value
when it was not yet set, because you mut ue bitmap pieces in mono-mode,
and they are not built in. But it is not forbidden to use bitmap pieces
in color
mode, so there is no reason to force the bitmapDirectory to empty when
switching off mono-mode. The user will have to indicate explicitly he wants
that, by clearing the bitmapDirectory field in the dialog together with
unticking
mono-mode.

You could argue that a value is forced in, should be automatically removed again when it is no more needed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]