git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27216 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-12-06 08:13:13 +00:00
parent 19b84c87b4
commit 7f9939a624

View file

@ -3229,10 +3229,12 @@ struct _DelegateWrapper
* so if we are linked in to an application which used that
* API, the delegate might return a BOOL rather than an
* NSTerminateNow. That's fine as both NSTerminateNow
* and BOOL are integers, and NSTerminateNow is defined as YES
* and NSTerminateCancel as NO.
* and BOOL are integral types (though potentially of different sizes),
* and NSTerminateNow is defined as YES and NSTerminateCancel as NO.
* So all we need to do is mask the low byte of the return value in
* case there is uninitialised random data in the higher bytes.
*/
termination = [_delegate applicationShouldTerminate: self];
termination = ([_delegate applicationShouldTerminate: self] & 0xff);
}
else
{