Skip to content

Commit a198804

Browse files
SuGliderCopilot
andauthored
rmt(fix): improve code reliability
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 198a49c commit a198804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/esp32-hal-rmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static bool _rmtWrite(int pin, rmt_data_t *data, size_t num_rmt_symbols, bool bl
311311
// loop > 1: transmit the data 'loop' times
312312
{
313313
char buf[12]; // place holder up to 5 + 1 + 5 + 1 bytes
314-
sprintf(buf, "%lu times", loop);
314+
snprintf(buf, sizeof(buf), "%lu times", loop);
315315
log_v(
316316
"GPIO: %d - Currently in Loop Mode: [%s] | Loop Request: [%s], LoopCancel: [%s]", pin,
317317
bus->rmt_ch_is_looping ? "YES" : "NO",

0 commit comments

Comments
 (0)