aboutsummaryrefslogtreecommitdiff
path: root/tests/gtload.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gtload.c')
-rw-r--r--tests/gtload.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/gtload.c b/tests/gtload.c
index b89ae1f..2920463 100644
--- a/tests/gtload.c
+++ b/tests/gtload.c
@@ -157,11 +157,12 @@ main (int argc, char **argv)
progname, line);
continue;
}
-
+ buf[j] = 0;
+
key.dptr = buf;
key.dsize = j + data_z;
- data.dptr = buf + j + 1;
- data.dsize = strlen (buf + j + 1) + data_z;
+ data.dptr = buf + i + 1;
+ data.dsize = strlen (data.dptr) + data_z;
if (gdbm_store (dbf, key, data, replace) != 0)
{
fprintf (stderr, "%s: %d: item not inserted\n",

Return to:

Send suggestions and report system problems to the System administrator.