diff --git a/vm/callstack.cpp b/vm/callstack.cpp index ad7528ab84..eae976219f 100755 --- a/vm/callstack.cpp +++ b/vm/callstack.cpp @@ -122,7 +122,7 @@ cell factor_vm::frame_scan(stack_frame *frame) if(obj.type_p(QUOTATION_TYPE)) { char *return_addr = (char *)FRAME_RETURN_ADDRESS(frame,this); - char *quot_entry_point = (char *)(frame_code(frame) + 1); + char *quot_entry_point = (char *)frame_code(frame)->entry_point(); return tag_fixnum(quot_code_offset_to_scan( obj.value(),(cell)(return_addr - quot_entry_point))); diff --git a/vm/io.cpp b/vm/io.cpp index 8ce7ff5256..94e6e64d1d 100755 --- a/vm/io.cpp +++ b/vm/io.cpp @@ -216,7 +216,7 @@ void factor_vm::primitive_fread() if(feof(file)) { byte_array *new_buf = allot_byte_array(c); - memcpy(new_buf + 1, buf.untagged() + 1,c); + memcpy(new_buf->data(), buf->data(),c); buf = new_buf; }