mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:30:37 +00:00
Change encoding/decoding to protect against differences in integer size.
This commit is contained in:
parent
05572b2d01
commit
35698d41b6
12 changed files with 233 additions and 163 deletions
|
@ -250,8 +250,11 @@ static Class pathComponentCellClass;
|
|||
}
|
||||
else
|
||||
{
|
||||
[coder decodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &_pathStyle];
|
||||
uint32_t tmp;
|
||||
|
||||
[coder decodeValueOfObjCType: @encode(uint32_t)
|
||||
at: &tmp];
|
||||
_pathStyle = tmp;
|
||||
[self setPathComponentCells: [coder decodeObject]];
|
||||
}
|
||||
|
||||
|
@ -270,8 +273,11 @@ static Class pathComponentCellClass;
|
|||
}
|
||||
else
|
||||
{
|
||||
[coder encodeValueOfObjCType: @encode(NSUInteger)
|
||||
at: &_pathStyle];
|
||||
uint32_t tmp;
|
||||
|
||||
tmp = _pathStyle;
|
||||
[coder encodeValueOfObjCType: @encode(uint32_t)
|
||||
at: &tmp];
|
||||
[coder encodeObject: [self pathComponentCells]];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue