gencgc: Make MAKE-LISP-OBJ of SIMPLE-FUN object addresses work.
[sbcl.git] / src / runtime / gencgc.c
index ecced08..1023b6f 100644 (file)
@@ -2130,7 +2130,7 @@ looks_like_valid_lisp_pointer_p(lispobj *pointer, lispobj *start_addr)
         case CODE_HEADER_WIDETAG:
           /* Make sure we actually point to a function in the code object,
            * as opposed to a random point there. */
-          if (SIMPLE_FUN_HEADER_WIDETAG==widetag_of(*(pointer-FUN_POINTER_LOWTAG)))
+          if (SIMPLE_FUN_HEADER_WIDETAG==widetag_of(*((lispobj *)(((unsigned long)pointer)-FUN_POINTER_LOWTAG))))
             return 1;
           else
             return 0;