fix (workaround) drtioaux packets being corrupted #176
@ -66,6 +66,13 @@ pub fn copy_work_buffer(src: *mut u16, dst: *mut u16, len: isize) {
|
|||||||
*dst.offset(i) = *src.offset(i);
|
*dst.offset(i) = *src.offset(i);
|
||||||
*dst.offset(i+1) = *src.offset(i+1);
|
*dst.offset(i+1) = *src.offset(i+1);
|
||||||
}
|
}
|
||||||
|
|||||||
|
// workaround for corrupted writes
|
||||||
|
// check and re-write
|
||||||
|
for i in 0..len {
|
||||||
|
if *dst.offset(i) != *src.offset(i) {
|
||||||
|
*dst.offset(i) = *src.offset(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
I think the compiler is allowed to reorder those, unless the memory is marked as volatile.