Skip to content

Commit

Permalink
Merge pull request BoltsFramework#147 from richardjrossiii/richardros…
Browse files Browse the repository at this point in the history
…s.undefined.behavior.fix

Fixed undefined behavior caused by casting block types.
  • Loading branch information
richardjrossiii committed Sep 10, 2015
2 parents 5aef7b3 + 04a0f59 commit 5524181
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Bolts/Common/BFTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ + (instancetype)taskWithDelay:(int)millis

+ (instancetype)taskFromExecutor:(BFExecutor *)executor
withBlock:(id (^)())block {
return [[self taskWithResult:nil] continueWithExecutor:executor withBlock:block];
return [[self taskWithResult:nil] continueWithExecutor:executor withBlock:^id(BFTask *task) {
return block();
}];
}

#pragma mark - Custom Setters/Getters
Expand Down

0 comments on commit 5524181

Please sign in to comment.