Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
807a9f8
)
ecere/com/instance: Fixed alignment issue (structSize not updated)
author
Jerome St-Louis
<jerome@ecere.com>
Fri, 11 Dec 2015 12:22:55 +0000
(07:22 -0500)
committer
Jerome St-Louis
<jerome@ecere.com>
Tue, 22 Dec 2015 06:45:08 +0000
(
01:45
-0500)
- structSize was not being updated to reflect adjustment to 'offset'
ecere/src/com/instance.ec
patch
|
blob
|
history
diff --git
a/ecere/src/com/instance.ec
b/ecere/src/com/instance.ec
index
1168cd8
..
1a887ee
100644
(file)
--- a/
ecere/src/com/instance.ec
+++ b/
ecere/src/com/instance.ec
@@
-5288,7
+5288,10
@@
public dllexport DataMember eClass_AddDataMember(Class _class, const char * name
_class.structAlignment = Max(_class.structAlignment, alignment);
if(_class.offset % alignment)
+ {
+ _class.structSize += alignment - (_class.offset % alignment);
_class.offset += alignment - (_class.offset % alignment);
+ }
if(_class.memberOffset % alignment)
_class.memberOffset += alignment - (_class.memberOffset % alignment);
}