output/csv: Drop extra separator on every line.

This commit is contained in:
Bert Vermeulen 2014-01-22 02:44:52 +01:00
parent e96cf218c0
commit 54da58ca9b
1 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,10 @@ static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
g_string_append_c(*out, c ? '1' : '0');
g_string_append_c(*out, ctx->separator);
}
if (i && j) {
/* Drop last separator. */
g_string_truncate(*out, (*out)->len - 1);
}
g_string_append_printf(*out, "\n");
}
break;