From: Ben Pfaff Date: Thu, 30 Sep 2010 04:31:43 +0000 (-0700) Subject: casereader: Fix casereader_select() with BY argument greater than 1. X-Git-Tag: v0.7.6~135 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=969913f76e3ee40e76f719794a6fa001daaaf307;p=pspp-builds.git casereader: Fix casereader_select() with BY argument greater than 1. This fixes the /CASES=BY subcommand on LIST. The following commit will add a test. --- diff --git a/src/data/casereader-select.c b/src/data/casereader-select.c index a26ef674..d75a605b 100644 --- a/src/data/casereader-select.c +++ b/src/data/casereader-select.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,7 +72,7 @@ casereader_select (struct casereader *subreader, { struct casereader_select *cs = xmalloc (sizeof *cs); cs->by = by; - cs->i = 0; + cs->i = by - 1; return casereader_create_filter_func (subreader, casereader_select_include, casereader_select_destroy,