diff --git a/src/ckdb.h b/src/ckdb.h index 47d37b0c..f9afb5ea 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -51,7 +51,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.5" -#define CKDB_VERSION DB_VERSION"-2.004" +#define CKDB_VERSION DB_VERSION"-2.005" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__ diff --git a/src/ckdb_data.c b/src/ckdb_data.c index 77cdca55..0743748c 100644 --- a/src/ckdb_data.c +++ b/src/ckdb_data.c @@ -4832,7 +4832,8 @@ int check_events(EVENTS *events) DATA_EVENTS_NULL(e, e_item); count = 0; // Remember the first username - STRNCPY(createby, e->createby); + if (e_item) + STRNCPY(createby, e->createby); user2 = false; while (e_item && e->id == events->id && strcmp(e->createinet, events->createinet) == 0 && @@ -4891,7 +4892,8 @@ int check_events(EVENTS *events) DATA_EVENTS_NULL(e, e_item); count = 0; // Remember the first username - STRNCPY(createby, e->createby); + if (e_item) + STRNCPY(createby, e->createby); user2 = false; while (e_item && e->id == events->id && strcmp(e->ipc, events->ipc) == 0 &&