mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Revert to pack record
It appeared that without the packed keyword, the compiler did not handle access to unaligned record data members, which leads to crashes on the device. Change-Id: I401f075e7f62458a4733baa8d81983d4be34b730
This commit is contained in:
committed by
Émilie Feral
parent
969fea7494
commit
5bc19af196
@@ -68,17 +68,6 @@ int Function::nameWithArgument(char * buffer, size_t bufferSize) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Function::RecordDataBuffer::RecordDataBuffer(KDColor color, size_t size) {
|
||||
/* Size is passed so that the entire derived RecordDataBuffer can be set to 0
|
||||
* before initializing parameters. This is done in order to ensure any padding
|
||||
* bits are set to 0 and prevent storage's CRC32 from depending on junk data. */
|
||||
assert(size >= sizeof(*this));
|
||||
memset(this, 0, size);
|
||||
// Members must be initialized after memset
|
||||
m_color = color;
|
||||
m_active = true;
|
||||
}
|
||||
|
||||
Function::RecordDataBuffer * Function::recordData() const {
|
||||
assert(!isNull());
|
||||
Ion::Storage::Record::Data d = value();
|
||||
|
||||
Reference in New Issue
Block a user