Skip to content

Commit 7d4c94c

Browse files
Update write function parameter to const pointer
Changed the write function parameter to accept a constant pointer for buffer input. This modification enhances data integrity and security by preventing unintended modifications to the buffer content during writing operations.
1 parent a8623bb commit 7d4c94c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP_I2S/src/ESP_I2S.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ size_t I2SClass::readBytes(char *buffer, size_t size) {
819819
return total_size;
820820
}
821821

822-
size_t I2SClass::write(uint8_t *buffer, size_t size) {
822+
size_t I2SClass::write(const uint8_t *buffer, size_t size) {
823823
size_t written = 0;
824824
size_t bytes_sent = 0;
825825
last_error = ESP_FAIL;

0 commit comments

Comments
 (0)