mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 01:12:19 -05:00
parent
79a29a62ef
commit
134aba4aa0
@ -99,8 +99,14 @@ void aClearBufferImpl(uint16_t addr, int nbytes) {
|
|||||||
memset(BUF_U8(addr), 0, nbytes);
|
memset(BUF_U8(addr), 0, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aLoadBufferImpl(const void *source_addr, uint16_t dest_addr, uint16_t nbytes) {
|
void aLoadBufferImpl(const void* source_addr, uint16_t dest_addr, uint16_t nbytes) {
|
||||||
|
#if __SANITIZE_ADDRESS__
|
||||||
|
for (size_t i = 0; i < ROUND_DOWN_16(nbytes); i++) {
|
||||||
|
BUF_U8(dest_addr)[i] = ((const unsigned char*)source_addr)[i];
|
||||||
|
}
|
||||||
|
#else
|
||||||
memcpy(BUF_U8(dest_addr), source_addr, ROUND_DOWN_16(nbytes));
|
memcpy(BUF_U8(dest_addr), source_addr, ROUND_DOWN_16(nbytes));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void aSaveBufferImpl(uint16_t source_addr, int16_t *dest_addr, uint16_t nbytes) {
|
void aSaveBufferImpl(uint16_t source_addr, int16_t *dest_addr, uint16_t nbytes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user