/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
const struct ordering *ordering = ordering_;
int result;
- if (ordering->positional)
- result = a->index < b->index ? -1 : a->index > b->index;
+ if (ordering->positional)
+ {
+ size_t a_index = var_get_dict_index (a);
+ size_t b_index = var_get_dict_index (b);
+ result = a_index < b_index ? -1 : a_index > b_index;
+ }
else
result = strcasecmp (var_get_name (a), var_get_name (b));
if (!ordering->forward)