]> Repositorios git - scryer-prolog.git/commitdiff
unmark_cell_bits! in push_literal (#2645)
authorMark Thom <[email protected]>
Fri, 1 Nov 2024 04:58:29 +0000 (22:58 -0600)
committerMark Thom <[email protected]>
Wed, 23 Apr 2025 06:32:32 +0000 (23:32 -0700)
src/arithmetic.rs

index f1256b6614247afa868d80f264b82b85f265f55b..8cb11743c0ab33d2d7e2a072b1a34ccc28520ee1 100644 (file)
@@ -62,6 +62,8 @@ pub(crate) struct ArithmeticEvaluator<'a> {
 }
 
 fn push_literal(interm: &mut Vec<ArithmeticTerm>, c: HeapCellValue) -> Result<(), ArithmeticError> {
+    let c = unmark_cell_bits!(c);
+
     read_heap_cell!(c,
         (HeapCellValueTag::Fixnum, n) => {
             interm.push(ArithmeticTerm::Number(Number::Fixnum(n)))