From 881a53b0d228ee09d27702cc51933e82d320fd93 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 10 Apr 2014 17:57:44 +0200 Subject: [PATCH] core: Allow objects to have the same size as sdb_object_t. That is, allow minimalistic objects which only have a name. --- src/core/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/object.c b/src/core/object.c index 177ac4c..9101918 100644 --- a/src/core/object.c +++ b/src/core/object.c @@ -82,7 +82,7 @@ sdb_object_vcreate(const char *name, sdb_type_t type, va_list ap) { sdb_object_t *obj; - if (type.size <= sizeof(sdb_object_t)) + if (type.size < sizeof(sdb_object_t)) return NULL; obj = malloc(type.size); -- 2.30.2