Browse Source

* simdb-tool : fix display of last row in db_usage_map()

master
Alex 'AdUser' Z 7 years ago
parent
commit
79a28ea13a
  1. 3
      src/simdb-tool.c

3
src/simdb-tool.c

@ -140,9 +140,10 @@ int db_usage_map(simdb_t *db, int cols) {
} }
m = map; m = map;
while (records) { while (records > 0) {
rest = (records > cols) ? cols : records; rest = (records > cols) ? cols : records;
memcpy(row, m, rest); memcpy(row, m, rest);
row[rest] = '\0';
pos = m - map + 1; pos = m - map + 1;
printf("%7d : %s\n", pos, row); printf("%7d : %s\n", pos, row);
m += rest; m += rest;

Loading…
Cancel
Save