Monotone-Parent: 915f4f176feb772bfa74b034b6b7ce28f66778f8
Monotone-Revision: 4fb71d76cac3b87ffc098133f9c93d0e753c5284 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-05T13:46:58 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
2864ffff1e
commit
37cbdd4378
|
@ -1,3 +1,8 @@
|
||||||
|
2010-05-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* VSSaxDriver.m (_endComponent:value:): avoid a crash occurring
|
||||||
|
when an inconsistency is found in the stack of containers.
|
||||||
|
|
||||||
2009-12-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2009-12-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* VSSaxDriver.m (_endComponent:value:): worked-around the lameness
|
* VSSaxDriver.m (_endComponent:value:): worked-around the lameness
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#import "VSSaxDriver.h"
|
#import "VSSaxDriver.h"
|
||||||
#import <SaxObjC/SaxException.h>
|
#import <SaxObjC/SaxException.h>
|
||||||
#import <NGExtensions/NGQuotedPrintableCoding.h>
|
#import <NGExtensions/NGQuotedPrintableCoding.h>
|
||||||
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
#import <NGExtensions/NSString+Encoding.h>
|
#import <NGExtensions/NSString+Encoding.h>
|
||||||
#import <NGCards/NSString+NGCards.h>
|
#import <NGCards/NSString+NGCards.h>
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
|
@ -653,6 +654,7 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
||||||
value: (NSString *) tagValue
|
value: (NSString *) tagValue
|
||||||
{
|
{
|
||||||
NSString *mtName;
|
NSString *mtName;
|
||||||
|
int max;
|
||||||
|
|
||||||
mtName = [[self _mapTagName: tagValue] uppercaseString];
|
mtName = [[self _mapTagName: tagValue] uppercaseString];
|
||||||
if ([cardStack count] > 0)
|
if ([cardStack count] > 0)
|
||||||
|
@ -692,11 +694,19 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
||||||
stringByAppendingString: mtName]];
|
stringByAppendingString: mtName]];
|
||||||
}
|
}
|
||||||
[self _endGroupElementTag: mtName];
|
[self _endGroupElementTag: mtName];
|
||||||
|
|
||||||
|
max = [cardStack count];
|
||||||
|
if (max > 0)
|
||||||
|
{
|
||||||
[cardStack removeLastObject];
|
[cardStack removeLastObject];
|
||||||
|
max--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[self errorWithFormat: @"serious inconsistency among begin/end tags"];
|
||||||
|
|
||||||
/* report parsed elements */
|
/* report parsed elements */
|
||||||
|
|
||||||
if ([cardStack count] == 0)
|
if (max == 0)
|
||||||
[self reportQueuedTags];
|
[self reportQueuedTags];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue