~ubuntu-branches/debian/sid/gnome-chess/sid

« back to all changes in this revision

Viewing changes to src/notation.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2005-09-04 18:16:43 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050904181643-qfph33u3pa4azz5h
Tags: 0.3.3-6
* Fix problems with gcc 4.0:
  + debian/patches/021-gcc-4.0-fixes.diff: New patch.
  + Closes: #258798 "FTBFS with gcc-3.4: label at end of compound statement"
* Fix wrong Debian patch:
  + debian/patch/019-assertions.diff: Fixed.
  + Partly addresses bug #247846 "Crashes after a few moves (assertion
    failed)". This fix is not perfect. As Göran Weinholt notes in the
    bug report, assertions are not the way to go, but are a temporary
    stop-gap measure. (Better assertions than unpredicable results.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
        file_to_ascii (&p, from);
141
141
        rank_to_ascii (&p, from);
142
142
 
143
 
        if (to & 128) {
 
143
        if (IS_PROMOTION (to)) {
144
144
                /* promotion */
145
145
                a = to;
146
146
 
240
240
        gshort anz, anz_n, anz_s;
241
241
        gshort i;
242
242
        gchar *p;
243
 
        gchar liste[100][10];
 
243
        gchar liste[10];
244
244
 
245
245
        delete_x(str);
246
246
        delete_plus(str);
252
252
        anz = position_legal_move (pos, &ap, &anz_s, &anz_n);
253
253
 
254
254
        for (aq = ap, i = 0; i < anz; i++, aq += 2) {
255
 
                p = liste[i];
 
255
                p = liste;
256
256
                piece_move_to_ascii (p, pos->square[*aq], *aq, *(aq + 1));
257
 
 
 
257
                delete_equal(p);
258
258
                if (*p == ' ') {
259
259
                        /* pawn move */
260
260
 
386
386
        desrank = desfile = promote = 0;
387
387
 
388
388
        /* Handle Promotion */
389
 
        if (to & 128) {
 
389
        if (IS_PROMOTION (to)) {
390
390
                promote = ((to >> 3) & 7)-1;
391
 
                if ( from > E4) {
 
391
                if (from > E4) {
392
392
                        to = (to & 7) + A8;
393
393
                        piece = WP;
394
394
                } else {