Skip to content

Commit

Permalink
Fix BUFFER_Clear only clearing half the intended range
Browse files Browse the repository at this point in the history
  • Loading branch information
bessman committed Jul 9, 2024
1 parent b503dd8 commit 54034b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ response_t BUFFER_Clear(void) {
uint16_t start = UART1_ReadInt();
uint16_t end = UART1_ReadInt();

memset((void *) &BUFFER[start], 0, end - start);
memset((void *) &BUFFER[start], 0, (end - start) * sizeof(int));

return SUCCESS;
}

0 comments on commit 54034b8

Please sign in to comment.