From: John Darrington Date: Mon, 27 Aug 2007 00:06:23 +0000 (+0000) Subject: Force display width to 8, if sys file says zero. Closes bug #20844 X-Git-Tag: v0.6.0~293 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89135f74964ca9277c46006377068f22721a26a7;p=pspp-builds.git Force display width to 8, if sys file says zero. Closes bug #20844 --- diff --git a/src/data/ChangeLog b/src/data/ChangeLog index a74b7dd4..73cf8a1c 100644 --- a/src/data/ChangeLog +++ b/src/data/ChangeLog @@ -1,3 +1,8 @@ +2007-08-27 John Darrinton + + * sys-file-reader.c (read_display_parameters): Force display width + to 8, if the sys file says 0 (like SPSS does). + 2007-08-12 Ben Pfaff * dictionary.c (dict_dump): New function. diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 058163b6..6527d271 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -857,6 +857,11 @@ read_display_parameters (struct sfm_reader *r, size_t size, size_t count, if (0 == measure && var_is_alpha (v)) measure = 1; + /* Older versions (SPSS 9.0) sometimes set the display width + to zero. This causes confusion especially in the GUI */ + if (0 == width) + width = 8; + if (measure < 1 || measure > 3 || align < 0 || align > 2) { if (!warned)