From: Ben Pfaff Date: Sat, 6 May 2006 21:26:48 +0000 (+0000) Subject: (does_dict_need_translation) Fix bug: inverted return value (!). X-Git-Tag: v0.6.0~888 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4a8d7e70526f52b3148f386344158f4b6f343ca;p=pspp-builds.git (does_dict_need_translation) Fix bug: inverted return value (!). --- diff --git a/src/data/ChangeLog b/src/data/ChangeLog index 92520a1c..c643a2eb 100644 --- a/src/data/ChangeLog +++ b/src/data/ChangeLog @@ -1,3 +1,8 @@ +Sat May 6 14:25:49 2006 Ben Pfaff + + * sys-file-writer.c: (does_dict_need_translation) Fix bug: + inverted return value (!). + Sat May 6 13:37:52 2006 Ben Pfaff Continue reforming procedure execution. diff --git a/src/data/sys-file-writer.c b/src/data/sys-file-writer.c index 89a513d0..fe2c27c8 100644 --- a/src/data/sys-file-writer.c +++ b/src/data/sys-file-writer.c @@ -328,6 +328,10 @@ sfm_open_writer (struct file_handle *fh, struct dictionary *d, goto error; } +/* Returns zero if dictionary D's cases are ordered in the + natural manner, with the first variable followed by the + second, and so on, + nonzero otherwise. */ static int does_dict_need_translation (const struct dictionary *d) { @@ -339,10 +343,10 @@ does_dict_need_translation (const struct dictionary *d) { struct variable *v = dict_get_var (d, i); if (v->fv != case_idx) - return 0; + return 1; case_idx += v->nv; } - return 1; + return 0; } /* Returns value of X truncated to two least-significant digits. */