Don't reset line/col on restart marker.
Check for duplicate attributes. Bump version.
This commit is contained in:
parent
e4f386c7f5
commit
e4aca335e2
|
@ -454,6 +454,10 @@ int csxml_feedChar(struct csxml* ctx, char ch)
|
|||
|
||||
default:
|
||||
if(ch != '=') ERROR("Invalid character in attribute name.");
|
||||
for(try = 0; (size_t)try < ctx->elemAttrNames.size; ++try) {
|
||||
if(!strcmp(ctx->elemAttrNames.data[try].data, ctx->buffer.data))
|
||||
ERROR("Duplicate attribute in element.");
|
||||
}
|
||||
TRY(list_push(ctx, &ctx->elemAttrNames, &ctx->buffer));
|
||||
CLEAR_BUFFER(buffer);
|
||||
ctx->state = StateElemAttrEq;
|
||||
|
@ -619,8 +623,6 @@ void csxml_reset(struct csxml* ctx)
|
|||
ctx->restartCount = 0;
|
||||
ctx->skipNextNewline = 0;
|
||||
ctx->parsingAttr = 0;
|
||||
ctx->line = 0;
|
||||
ctx->col = 0;
|
||||
ctx->elemStack.len = 0;
|
||||
ctx->elemAttrNames.len = 0;
|
||||
ctx->elemAttrVals.len = 0;
|
||||
|
|
|
@ -14,4 +14,4 @@ SOMAJOR=0
|
|||
SOMINOR=0
|
||||
|
||||
# SOMICRO is bumped every time there is a binary-compatible release.
|
||||
SOMICRO=5
|
||||
SOMICRO=6
|
||||
|
|
Loading…
Reference in New Issue