actually encode integers

This commit is contained in:
Michele Balistreri 2023-08-11 15:18:14 +02:00
parent 684ddc2481
commit 5d1e989581
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
1 changed files with 4 additions and 0 deletions

View File

@ -422,6 +422,10 @@ static app_err_t eip712_encode_field(uint8_t out[32], uint8_t* heap, size_t heap
} }
memset(out, res < 0 ? 0xff : 0x00, 24); memset(out, res < 0 ? 0xff : 0x00, 24);
for (int i = 31; i >= 24; i--) {
out[i] = res & 0xff;
res >>= 8;
}
} }
} }