bugXBoard - Bugs: bug #34980, Promotion in play at ICS fails...

 
 

bug #34980: Promotion in play at ICS fails with localized Xboard

Submitter:  Byrial Jensen <bjensen>
Submitted:  Sat 03 Dec 2011 09:49:39 PM UTC
   
 
Category:  XBoard (X11) Severity:  3 - Normal
Item Group:  None Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Dec 2011 12:23:24 AM UTC, comment #1: 

Well, I did see that HGM wants to get rid of the promotion popup.

But while it is here, I will repair it as it can be done quite simple. When you register PromotionCallback() as callback function for the buttons in the promotion popup, you can give a pointer to client_data - so I let just client_data be the promotion char.

The result is that PromotionCallback don't have to care the - possibly translated - text on the buttons. Actually the patch that I will push in a moment takes out more code than it inserts.

Byrial Jensen <bjensen>
Group Member
Sat 03 Dec 2011 09:49:39 PM UTC, original submission:  

Hi,

I just tried the Danish version of Xboard 4.6.0.20111101 playing at FICS (freechess.org).

When I tried to promote a pawn using the promotion pop up window, I got an illegal move response from FICS.

Fortunately I had time to switch to "Almost Always Queen", which worked fine so I could win the game. :)

Anyway I looked at the function PromotionCallback() in xboard.c and found this code:

if (strcmp(name, _("Knight")) == 0) {
promoChar = 'n';
    } else if (strcmp(name, _("Promote")) == 0) {
promoChar = '+';
    } else if (strcmp(name, _("Defer")) == 0) {
promoChar = '=';
    } else {
promoChar = ToLower(name[0]);
    }

So it seems that the variable name contains the translated name of the piece, and in that case you cannot just send the lowercase version of the first character to the ICS.

Byrial Jensen <bjensen>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by apersaud (Updated the item)
  • -email is unavailable- added by bjensen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-22 apersaud StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2011-12-19 bjensen StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code