Browse Source

* simdb_usage_slice() : fix segfault

master
Alex 'AdUser' Z 7 years ago
parent
commit
d13931f0e9
  1. 2
      src/database.c

2
src/database.c

@ -574,7 +574,7 @@ simdb_usage_slice(simdb_t * const db, char ** const map, int offset, int limit)
if ((m = calloc(limit + 1, sizeof(char))) == NULL) if ((m = calloc(limit + 1, sizeof(char))) == NULL)
return SIMDB_ERR_OOM; return SIMDB_ERR_OOM;
m = *map; *map = m;
r = data; r = data;
for (int i = 0; i < limit; i++, m++, r++) { for (int i = 0; i < limit; i++, m++, r++) {

Loading…
Cancel
Save