Previously we'd output "4/ . 3/. /", but some clients can not handle
the omitted "total" number. So we now output the simpler "4 . 3 ."
instead.
* counts are one-based.
*/
if (num) htsbuf_qprintf(hq, "%d", num - 1);
- htsbuf_append_str(hq, "/");
- if (cnt) htsbuf_qprintf(hq, "%d", cnt);
+ /* Some clients can not handle "X", only "X/Y" or "/Y",
+ * so only output "/" if needed.
+ */
+ if (cnt) {
+ htsbuf_append_str(hq, "/");
+ htsbuf_qprintf(hq, "%d", cnt);
+ }
}
/*