Skip to content

Commit f46021b

Browse files
committed
Missed previous commit
1 parent f9b3f21 commit f46021b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

targets/ESP32/_nanoCLR/System.Device.I2c.Slave/sys_dev_i2c_slave_native_System_Device_I2c_I2cSlaveDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ HRESULT Library_sys_dev_i2c_slave_native_System_Device_I2c_I2cSlaveDevice::
471471
{
472472
// copy over to the managed buffer
473473
// grab the pointer to the array by starting and the offset specified in the span
474-
memcpy(readBuffer->GetElement(bufferOffset), palI2c->Buffer, bytesTransfered);
474+
memcpy(readBuffer->GetFirstElement(), palI2c->Buffer, bytesTransfered);
475475
}
476476

477477
// pop read count from the stack

targets/ESP32/_nanoCLR/System.Device.I2c/sys_dev_i2c_native_System_Device_I2c_I2cDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ HRESULT Library_sys_dev_i2c_native_System_Device_I2c_I2cDevice::
287287
if (readSize > 0)
288288
{
289289
// grab the pointer to the array by starting and the offset specified in the span
290-
memcpy(readData->GetElement(readOffset), readBuffer, readSize);
290+
memcpy(readData->GetFirstElement(), readBuffer, readSize);
291291
}
292292

293293
result[I2cTransferResult::FIELD___status].SetInteger((CLR_UINT32)I2cTransferStatus_FullTransfer);

0 commit comments

Comments
 (0)