[apps/sequence][apps/graph] Checksum takes into account whether the

function is active and its name

Change-Id: I790d9a793c512a686f21f1db4fc0848a16baea5c
This commit is contained in:
Émilie Feral
2017-05-29 11:41:39 +02:00
parent 1966b4648c
commit 832af9f9f4
4 changed files with 7 additions and 2 deletions

View File

@@ -87,6 +87,9 @@ uint32_t Sequence::checksum() {
strlcpy(data, text(), TextField::maxBufferSize());
strlcpy(data+TextField::maxBufferSize(), firstInitialConditionText(), TextField::maxBufferSize());
strlcpy(data+2*TextField::maxBufferSize(), secondInitialConditionText(), TextField::maxBufferSize());
data[k_dataLengthInBytes-3] = (char)m_type;
data[k_dataLengthInBytes-2] = name()!= nullptr ? name()[0] : 0;
data[k_dataLengthInBytes-1] = isActive() ? 1 : 0;
return Ion::crc32((uint32_t *)data, k_dataLengthInBytes>>2);
}