From c5aa1f26b7df7a589d2c33885cdc8755736fd9ff Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Fri, 17 Sep 2021 10:50:17 -0500 Subject: [PATCH] Fix bug in deserialization of pointer types --- src/coffi/ffi.clj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/coffi/ffi.clj b/src/coffi/ffi.clj index 19e9324..367d576 100644 --- a/src/coffi/ffi.clj +++ b/src/coffi/ffi.clj @@ -395,10 +395,8 @@ (defmethod deserialize-from ::pointer [segment type] - (if (sequential? type) - (deserialize (slice-global (MemoryAccess/getAddress segment) (size-of (second type))) - (second type)) - (MemoryAccess/getAddress segment))) + (cond-> (MemoryAccess/getAddress segment) + (sequential? type) (deserialize* type))) (defmulti deserialize* "Deserializes a primitive object into a Clojure data structure.