changeset 103939:fb9d149af914

(shuffle): Fix the logic of setting up the cycle.
author Kenichi Handa <handa@m17n.org>
date Fri, 17 Jul 2009 01:27:50 +0000
parents b6678898a7da
children 2f59f01ae070
files src/casetab.c
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/casetab.c	Thu Jul 16 21:04:18 2009 +0000
+++ b/src/casetab.c	Fri Jul 17 01:27:50 2009 +0000
@@ -229,7 +229,6 @@
 {
   if (NATNUMP (elt))
     {
-      Lisp_Object tem = Faref (table, elt);
       int from, to;
 
       if (CONSP (c))
@@ -241,11 +240,11 @@
 	from = to = XINT (c);
 
       for (; from <= to; from++)
-	if (from != XINT (elt))
-	  {
-	    Faset (table, elt, make_number (from));
-	    Faset (table, make_number (from), tem);
-	  }
+	{
+	  Lisp_Object tem = Faref (table, elt);
+	  Faset (table, elt, make_number (from));
+	  Faset (table, make_number (from), tem);
+	}
     }
 }