aboutsummaryrefslogtreecommitdiff
path: root/tests/dtload.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dtload.c')
-rw-r--r--tests/dtload.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/dtload.c b/tests/dtload.c
index 6ebd638..a02b36c 100644
--- a/tests/dtload.c
+++ b/tests/dtload.c
@@ -134,11 +134,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 (store (key, data) != 0)
{
fprintf (stderr, "%s: %d: item not inserted\n",

Return to:

Send suggestions and report system problems to the System administrator.