Skip to content

Commit 971e1db

Browse files
committed
fix build of test suite
1 parent 2206140 commit 971e1db

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

rules/string/tgt_refcount.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,16 @@ fn f20(a0: Ptr<u8>, a1: usize) -> Ptr<u8> {
103103
a0.offset(a1 as isize)
104104
}
105105

106-
fn f21(a0: &mut Vec<u8>, a1: usize, a2: u8) -> &Vec<u8> {
106+
// TODO: This should return a0
107+
fn f21(a0: &mut Vec<u8>, a1: usize, a2: u8) -> Vec<u8> {
107108
a0.pop();
108-
a0.resize(a0.len() + a1, a2);
109+
a0.resize(a0.len() + (a1) as usize, a2);
109110
a0.push(0);
110-
a0
111+
a0.clone()
111112
}
112113

113114
fn f26(a0: Ptr<Vec<u8>>, a1: usize) -> Ptr<u8> {
114-
if a1 >= (*a0.upgrade().deref()).len().saturating_sub(1) {
115+
if a1 as usize >= (*a0.upgrade().deref()).len().saturating_sub(1) {
115116
panic!("out of bounds access")
116117
} else {
117118
(a0.to_strong().as_pointer() as Ptr<u8>).offset(a1 as isize)

0 commit comments

Comments
 (0)