From 7762e979818fd2438db0fcc086a0544f0954d8c1 Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Sat, 16 Jul 2022 17:28:54 -0500 Subject: [PATCH] For direct atom, return pointer to atom instead of immediately-stale pointer to direct copy --- rust/iron-planet/src/noun.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/iron-planet/src/noun.rs b/rust/iron-planet/src/noun.rs index 58075db..466981c 100644 --- a/rust/iron-planet/src/noun.rs +++ b/rust/iron-planet/src/noun.rs @@ -413,7 +413,7 @@ impl Atom { pub fn data_pointer(&self) -> *const u64 { match self.as_either() { - Either::Left(direct) => &(direct.0), + Either::Left(direct) => (self as *const Atom) as *const u64, Either::Right(indirect) => indirect.data_pointer(), } }