The comment for the CSV output module says probes are ordered e.g.
0,1,2,3, but the actual values were in the 3,2,1,0 order.
We're fixing this by making the order of the probe values 0,1,2,3 too
for now, but this will become a configurable option later on.
Thanks Patrick Servello <redacted> for the patch.
{
struct context *ctx;
GString *outstr;
- uint64_t sample, i;
- int j;
+ uint64_t sample, i, j;
if (!o) {
sr_err("%s: o was NULL", __func__);
for (i = 0; i <= length_in - ctx->unitsize; i += ctx->unitsize) {
memcpy(&sample, data_in + i, ctx->unitsize);
- for (j = ctx->num_enabled_probes - 1; j >= 0; j--) {
+ for (j = 0; j < ctx->num_enabled_probes; j++) {
g_string_append_printf(outstr, "%d%c",
(int)((sample & (1 << j)) >> j),
ctx->separator);