From 21690b2c4e48d5f6a0560842fa9e89dbb2c6fd36 Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Mon, 15 Aug 2022 17:27:51 +0300 Subject: [PATCH] Fix vnode's float & double containing cases --- src/vnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vnode.c b/src/vnode.c index b95d8a0..5a30d6e 100644 --- a/src/vnode.c +++ b/src/vnode.c @@ -157,11 +157,11 @@ vnode_t libcdsb_vnode_create(const void* v, vtype t) { else _.ptr = memndup(v, sizeof(u64_t)); break; - case VTYPE_FLOAT: if (is_permissible(fl_t)) _.ld = *(fl_t*)v; + case VTYPE_FLOAT: if (is_permissible(fl_t)) _.f = *(fl_t*)v; else _.ptr = memndup(v, sizeof(fl_t)); break; - case VTYPE_DOUBLE: if (is_permissible(dbl_t)) _.ld = *(dbl_t*)v; + case VTYPE_DOUBLE: if (is_permissible(dbl_t)) _.d = *(dbl_t*)v; else _.ptr = memndup(v, sizeof(dbl_t)); break;