Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 81559fd

Browse files
committed
Add int casting to use the modern boxing syntax
1 parent 28be96f commit 81559fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shell/platform/darwin/common/framework/Source/FlutterChannels.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ static void ResizeChannelBuffer(NSObject<FlutterBinaryMessenger>* binaryMessenge
1616
NSString* channel,
1717
NSInteger newSize) {
1818
NSCAssert(newSize >= 0, @"Channel buffer size must be non-negative");
19-
NSArray* args = @[ channel, @(newSize) ];
19+
// Cast newSize to int because the deserialization logic handles only 32 bits values,
20+
// see
21+
// https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L495.
22+
NSArray* args = @[ channel, @((int)newSize) ];
2023
FlutterMethodCall* resizeMethodCall = [FlutterMethodCall methodCallWithMethodName:kResizeMethod
2124
arguments:args];
2225
NSObject<FlutterMethodCodec>* codec = [FlutterStandardMethodCodec sharedInstance];

0 commit comments

Comments
 (0)