Skip to content

Commit fb61a0f

Browse files
authored
use macro to decode NSInteger into enum - fixes 64Bit Big Endian (#292)
1 parent 22e5304 commit fb61a0f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Source/NSBox.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<abstract>Simple box view that can display a border and title
44
</abstract>
55
6-
Copyright (C) 1996-2015 Free Software Foundation, Inc.
6+
Copyright (C) 1996-2024 Free Software Foundation, Inc.
77
88
Author: Scott Christley <scottc@net-community.com>
99
Date: 1996
@@ -41,6 +41,7 @@
4141
#import "AppKit/NSTextFieldCell.h"
4242
#import "AppKit/NSWindow.h"
4343
#import "GNUstepGUI/GSTheme.h"
44+
#import "GSGuiPrivate.h"
4445

4546
#include <math.h>
4647

@@ -637,10 +638,12 @@ - (id) initWithCoder: (NSCoder*)aDecoder
637638
}
638639
else
639640
{
641+
NSInteger tempInt;
642+
640643
[aDecoder decodeValueOfObjCType: @encode(id) at: &_cell];
641644
_offsets = [aDecoder decodeSize];
642-
[aDecoder decodeValueOfObjCType: @encode(int)
643-
at: &_border_type];
645+
decode_NSInteger(aDecoder, &tempInt);
646+
_border_type = tempInt;
644647
[aDecoder decodeValueOfObjCType: @encode(int)
645648
at: &_title_position];
646649

0 commit comments

Comments
 (0)