Fix for ES 8.X #302

This commit is contained in:
2023-04-14 21:48:29 -04:00
parent d43aac735f
commit 886fa720ec
3 changed files with 6 additions and 3 deletions

View File

@@ -312,7 +312,10 @@ void sist2_index(index_args_t *args) {
database_open(db);
database_iterator_t *iterator = database_create_document_iterator(db);
database_document_iter_foreach(json, iterator) {
const char *doc_id = cJSON_GetObjectItem(json, "_id")->valuestring;
char doc_id[SIST_DOC_ID_LEN];
strcpy(doc_id, cJSON_GetObjectItem(json, "_id")->valuestring);
cJSON_DeleteItemFromObject(json, "_id");
if (args->print) {
print_json(json, doc_id);
} else {

View File

@@ -51,7 +51,7 @@
#include <ctype.h>
#include "git_hash.h"
#define VERSION "3.0.1"
#define VERSION "3.0.2"
static const char *const Version = VERSION;
static const int VersionMajor = 3;
static const int VersionMinor = 0;