Skip to content

Commit

Permalink
Merge pull request #403 from pebble8888/fix_xcode5
Browse files Browse the repository at this point in the history
Fix crash typing '100' in Xcode5
  • Loading branch information
JugglerShu committed Jul 5, 2013
2 parents 42dac3e + 8049839 commit 069dc31
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions XVim/XVimEvaluatorContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ - (NSUInteger)numericArg
- (void)pushEmptyNumericArgHead
{
_numericArgTail = [self numericArg];
[_numericArgHead release];
_numericArgHead = nil;
}

- (void)setNumericArgHead:(NSUInteger)numericArg
{
_numericArgHead = [NSNumber numberWithUnsignedInteger:numericArg];
[_numericArgHead release];
_numericArgHead = [[NSNumber numberWithUnsignedInteger:numericArg] retain];
}

- (NSNumber*)numericArgHead
Expand All @@ -91,13 +93,16 @@ - (NSString*)argumentString

- (XVimEvaluatorContext*)setArgumentString:(NSString*)argument
{
[_argumentString release];
_argumentString = [argument copy];
return self;
}

- (XVimEvaluatorContext*)appendArgument:(NSString*)argument
{
_argumentString = [_argumentString stringByAppendingString:argument];
NSString* str = [_argumentString stringByAppendingString:argument];
[_argumentString release];
_argumentString = [str retain];
return self;
}

Expand All @@ -112,4 +117,4 @@ - (XVimEvaluatorContext*)copy
return instance;
}

@end
@end

0 comments on commit 069dc31

Please sign in to comment.