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

index 55770f888b350fd339afe54fe32a7aed61d6ab0f..7335f625986aacb87b3752fc1c225c9c4ce64081 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)))