From 3300120a437b65fa0bd216e8d8d4d2d458d09b0a Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 27 Apr 2013 07:38:54 +0200 Subject: [PATCH] Correct error message from previous commit. Commit 49b3e593c078b40d7c72379b4f8622a1ea8d7ea1 produced a misleading and non-sensical error message. This change fixes that. --- src/language/xforms/recode.c | 2 +- tests/language/xforms/recode.at | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/language/xforms/recode.c b/src/language/xforms/recode.c index 2849ea32d1..1aebe34469 100644 --- a/src/language/xforms/recode.c +++ b/src/language/xforms/recode.c @@ -563,7 +563,7 @@ enlarge_dst_widths (struct recode_trns *trns) { msg (ME, _("Cannot recode because the variable %s would require a width of %d bytes or greater, but it has a width of only %d bytes."), - var_get_name (narrow_var), out->width, trns->max_dst_width); + var_get_name (narrow_var), out->width, min_dst_width); return false; } diff --git a/tests/language/xforms/recode.at b/tests/language/xforms/recode.at index ae434c657a..cf5036d49d 100644 --- a/tests/language/xforms/recode.at +++ b/tests/language/xforms/recode.at @@ -300,7 +300,7 @@ AT_CLEANUP AT_SETUP([RECODE increased string widths]) AT_DATA([recode.sps],[dnl -data list list /x (a1) y (a8) z *. +data list notable list /x (a1) y (a8) z *. begin data. a a 2 a two 2 @@ -314,13 +314,7 @@ list. ]) AT_CHECK([pspp -O format=csv recode.sps], [1], [dnl -Table: Reading free-form data from INLINE. -Variable,Format -x,A1 -y,A8 -z,F8.0 - -"error: Cannot recode in place, because the variable x would require a width of 5 bytes or greater, but it has a width of only 8 bytes." +"error: Cannot recode because the variable x would require a width of 5 bytes or greater, but it has a width of only 1 bytes." Table: Data List x,y,z -- 2.30.2