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

 
 

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

Submitted by:  Byrial Jensen <bjensen>
Submitted on:  Sat 03 Dec 2011 09:49:39 PM UTC  
 
Category: XBoard (X11)Severity: 3 - Normal
Item Group: NoneStatus: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Jan 2012 01:26:59 AM UTCapersaudStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 19 Dec 2011 12:23:24 AM UTCbjensenStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1