From 7aa7fadc5b6a0660cb004ffdbb7f80575add4b9b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 2 Apr 2018 18:01:19 +0100 Subject: [PATCH] ITS#8831 move flag init into readhdr Avoid stomping on flags from 1st readhr invocation --- libraries/liblmdb/mdb_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb_load.c b/libraries/liblmdb/mdb_load.c index 4783f92..74d87b9 100644 --- a/libraries/liblmdb/mdb_load.c +++ b/libraries/liblmdb/mdb_load.c @@ -64,6 +64,7 @@ static void readhdr(void) { char *ptr; + flags = 0; while (fgets(dbuf.mv_data, dbuf.mv_size, stdin) != NULL) { lineno++; if (!strncmp(dbuf.mv_data, "VERSION=", STRLENOF("VERSION="))) { @@ -371,7 +372,6 @@ int main(int argc, char *argv[]) while(!Eof) { MDB_val key, data; int batch = 0; - flags = 0; if (!dohdr) { dohdr = 1;