mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
safety fix in case code incorrectly tries to use the reuslt of forwarding a method to the undo manager.
This commit is contained in:
parent
4f0a8d60c2
commit
156be3ad53
2 changed files with 13 additions and 0 deletions
|
@ -1,4 +1,10 @@
|
|||
2024-10-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSUndoManager.m: set zero/nil return value when forwarding
|
||||
invocation ... in case calling code tries to use the result.
|
||||
|
||||
2024-10-28 Hugo Melder <hugo@algoriddim.com>
|
||||
|
||||
* Source/NSString.m:
|
||||
-commonPrefixWithString:options: returns nil when string supplied as
|
||||
first argument is nil. On macOS, the empty string is returned instead.
|
||||
|
|
|
@ -429,6 +429,11 @@
|
|||
*/
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation
|
||||
{
|
||||
NSUInteger size = [[anInvocation methodSignature] methodReturnLength];
|
||||
unsigned char v[size];
|
||||
|
||||
memset(v, '\0', size);
|
||||
|
||||
if (_disableCount == 0)
|
||||
{
|
||||
if (_nextTarget == nil)
|
||||
|
@ -466,6 +471,8 @@
|
|||
_runLoopGroupingPending = YES;
|
||||
}
|
||||
}
|
||||
|
||||
[anInvocation setReturnValue: (void*)v];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue