Fix marshalling loop

This commit is contained in:
Jasper Blanckenburg 2023-04-02 01:01:16 +02:00
parent f151e3a4fe
commit 433a142732
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ uint8_t *ftcan_marshal_unsigned(uint8_t *data, uint64_t val, size_t num_bytes) {
num_bytes = 8;
}
for (size_t i = num_bytes - 1; i >= 0; i++) {
for (int i = num_bytes - 1; i >= 0; i--) {
data[i] = val & 0xFF;
val >>= 8;
}