This commit is contained in:
Kolan Sh 2011-07-04 11:31:35 +04:00
parent 6806be37ce
commit 7c3423155f
1 changed files with 6 additions and 2 deletions

View File

@ -160,6 +160,7 @@ void tex_parse(const char *source, size_t len, struct zerror_s **error)
case IN_TAGPARM: case IN_TAGPARM:
if (c == '{' || c == '[') { // tag params if (c == '{' || c == '[') { // tag params
zclear(&param);
where_stack[++tex_level] = IN_TAGPARM; where_stack[++tex_level] = IN_TAGPARM;
} else if (c == '}' || c == ']') { // end tag params } else if (c == '}' || c == ']') { // end tag params
@ -183,6 +184,8 @@ void tex_parse(const char *source, size_t len, struct zerror_s **error)
source[i], (u_int8_t)source[i], i); source[i], (u_int8_t)source[i], i);
return; return;
} }
zalloc_append8_str(param, c);
break; break;
case IN_TAG_UNKNOWN: case IN_TAG_UNKNOWN:
@ -251,10 +254,11 @@ void tex_parse(const char *source, size_t len, struct zerror_s **error)
break; break;
}//*/ }//*/
if (c == '{' || c == '[') if (c == '{' || c == '[') {
zclear(&param);
where_stack[++tex_level] = IN_TAGPARM; where_stack[++tex_level] = IN_TAGPARM;
else if (c == '}' || c == ']') { } else if (c == '}' || c == ']') {
where_stack[tex_level--] = IN_UNDEF; where_stack[tex_level--] = IN_UNDEF;
i--; i--;