mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/sequence][apps/graph] CRC should be called on sizes multiple of 4
Change-Id: I4a55c14e1418f730051252cabef324833279747f
This commit is contained in:
@@ -27,11 +27,9 @@ Function& Function::operator=(const Function& other) {
|
||||
}
|
||||
|
||||
uint32_t Function::checksum() {
|
||||
size_t dataLengthInBytes = TextField::maxBufferSize()*sizeof(char);
|
||||
assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4
|
||||
char data[TextField::maxBufferSize()] = {};
|
||||
char data[k_dataLengthInBytes/sizeof(char)] = {};
|
||||
strlcpy(data, m_text, TextField::maxBufferSize());
|
||||
return Ion::crc32((uint32_t *)data, dataLengthInBytes>>2);
|
||||
return Ion::crc32((uint32_t *)data, k_dataLengthInBytes>>2);
|
||||
}
|
||||
|
||||
void Function::setContent(const char * c) {
|
||||
|
||||
Reference in New Issue
Block a user