Skip to content

Commit

Permalink
bigBuffer: should be aligned to 4 bytes
Browse files Browse the repository at this point in the history
bigBuffer users cast it to something strange and expect it to be
aligned
  • Loading branch information
dron0gus authored and rusefillc committed Jul 25, 2023
1 parent 8282962 commit 1e43299
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firmware/controllers/core/big_buffer.cpp
Expand Up @@ -3,7 +3,8 @@
#include "big_buffer.h"

static BigBufferUser s_currentUser;
static uint8_t s_bigBuffer[BIG_BUFFER_SIZE];
// uint32_t for 4-byte aligment
static uint32_t s_bigBuffer[BIG_BUFFER_SIZE / sizeof(uint32_t)];

static void releaseBuffer(void* bufferPtr, BigBufferUser user) {
if (bufferPtr != &s_bigBuffer || user != s_currentUser) {
Expand Down

0 comments on commit 1e43299

Please sign in to comment.