diff --git a/CHANGELOG.md b/CHANGELOG.md index 717ee20..1a6a7ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This change ## [Unreleased] ### Fixed +- `nil` was not considered a null pointer - Primitive-serializing types fail to compile as arguments to downcall handles - Primitive-serializing types fail to load as arguments to upcall functions - Void return types on upcalls crash the JVM diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index c885226..fb050c3 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -128,7 +128,7 @@ (defn null? "Checks if a memory address is null." [addr] - (.equals (MemoryAddress/NULL) addr)) + (or (.equals (MemoryAddress/NULL) addr) (not addr))) (defn slice-global "Gets a slice of the global address space.