X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fspv%2Fspv-light-decoder.c;h=0ce5c06924c3c52e78952e752dba1eecab431640;hb=342054b3c99a69d3ce8be3ae3ee571a4cfad3073;hp=20f7afa11b338819c902e3565bdddcde00463b8f;hpb=880924c2c10557f211e71af79d014cd1fd26607a;p=pspp diff --git a/src/output/spv/spv-light-decoder.c b/src/output/spv/spv-light-decoder.c index 20f7afa11b..0ce5c06924 100644 --- a/src/output/spv/spv-light-decoder.c +++ b/src/output/spv/spv-light-decoder.c @@ -302,6 +302,7 @@ decode_spvlb_value (const struct pivot_table *table, out->type = PIVOT_VALUE_NUMERIC; out->numeric.x = in->type_01.x; error = spv_decode_fmt_spec (in->type_01.format, &out->numeric.format); + out->numeric.honor_small = (in->type_01.format >> 16) == 40; if (error) return error; break; @@ -415,6 +416,7 @@ decode_spvlb_value (const struct pivot_table *table, out->footnote_indexes[out->n_footnotes++] = idx; } + pivot_value_sort_footnotes (out); } if (vm->style_pair) @@ -728,7 +730,7 @@ decode_data_index (uint64_t in, const struct pivot_table *table, size_t *out) { uint64_t remainder = in; - for (size_t i = table->n_dimensions - 1; i > 0; i--) + for (size_t i = table->n_dimensions - 1; i < table->n_dimensions; i--) { const struct pivot_dimension *d = table->dimensions[i]; if (d->n_leaves) @@ -739,10 +741,9 @@ decode_data_index (uint64_t in, const struct pivot_table *table, else out[i] = 0; } - if (remainder >= table->dimensions[0]->n_leaves) + if (remainder) return xasprintf ("out of range cell data index %"PRIu64, in); - out[0] = remainder; return NULL; }