segfault
This commit is contained in:
parent
6806be37ce
commit
7c3423155f
|
@ -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(¶m);
|
||||||
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(¶m);
|
||||||
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--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue