From e1d0f91275ea1e8bfb35e8c9b404a80a47715325 Mon Sep 17 00:00:00 2001 From: Vitaly Ostrosablin Date: Fri, 10 Mar 2023 21:59:52 +0300 Subject: [PATCH] Correct a small bug in metamove animation. We were marking wrong column as free, which sometimes leads to incorrect unwinding of intermediate moves. Obviously, this should have marked freed (source) column as free, not the destination column. Signed-off-by: Vitaly Ostrosablin --- NEWS | 2 ++ configure | 8 ++++---- configure.ac | 2 +- src/freecell.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index a61b3ac..1d380ed 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +1.2.6 Correct a bug in metamove animation implementation. + 1.2.5 Add support for multiselecting cards in column by repeatedly pressing column key, rather only with vi-style number prefixes. Each press will add one more card to selection if next card is in correct order. diff --git a/configure b/configure index bcc3781..1f8fab1 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for freecell 1.2.5. +# Generated by GNU Autoconf 2.61 for freecell 1.2.6. # # Report bugs to . # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='freecell' PACKAGE_TARNAME='freecell' -PACKAGE_VERSION='1.2.5' -PACKAGE_STRING='freecell 1.2.5' +PACKAGE_VERSION='1.2.6' +PACKAGE_STRING='freecell 1.2.6' PACKAGE_BUGREPORT='tmp6154@yandex.ru' ac_default_prefix=/usr/games @@ -2062,7 +2062,7 @@ fi # Define the identity of the package. PACKAGE='freecell' - VERSION='1.2.5' + VERSION='1.2.6' cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index ac8832d..37a9ca4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # AC_PREREQ(2.61) -AC_INIT([freecell],[1.2.5],[tmp6154@yandex.ru]) +AC_INIT([freecell],[1.2.6],[tmp6154@yandex.ru]) AM_INIT_AUTOMAKE diff --git a/src/freecell.c b/src/freecell.c index 0762509..e382a8c 100644 --- a/src/freecell.c +++ b/src/freecell.c @@ -616,7 +616,7 @@ void metamove(struct column *scol, int seln, struct column *dcol, int *freecells if (!scol->ncard) { for(int i = 0; i < 8; i++) { - if(&column[i] == dcol) { + if(&column[i] == scol) { freecolumns |= (1 << i); break; }