Skip to content

Commit

Permalink
Fix a stack overflow in the C callback userNotificationCenter from hs…
Browse files Browse the repository at this point in the history
….notify
  • Loading branch information
cmsj committed Apr 10, 2018
1 parent 6d2dae7 commit f199351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/notify/internal.m
Expand Up @@ -158,11 +158,11 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center
// NSLog(@"invoking callback handler") ;

if ([skin protectedCallAndError:@"hs.notify callback" nargs:2 nresults:0] == NO) {
lua_pop(skin.L, 1); // pop the hs.notify module
_lua_stackguard_exit(skin.L);
return;
}

// FIXME: Things have been pushed onto the Lua stack, we probably need some lua_pop()s here
lua_pop(skin.L, 1); // pop the hs.notify module

BOOL shouldWithdraw = [[notification.userInfo valueForKey:@"autoWithdraw"] boolValue] ;
if (notification.deliveryRepeatInterval != nil) shouldWithdraw = YES ;
Expand Down

0 comments on commit f199351

Please sign in to comment.