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:
|
||||
if (c == '{' || c == '[') { // tag params
|
||||
zclear(¶m);
|
||||
where_stack[++tex_level] = IN_TAGPARM;
|
||||
|
||||
} 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);
|
||||
return;
|
||||
}
|
||||
|
||||
zalloc_append8_str(param, c);
|
||||
break;
|
||||
|
||||
case IN_TAG_UNKNOWN:
|
||||
|
@ -251,10 +254,11 @@ void tex_parse(const char *source, size_t len, struct zerror_s **error)
|
|||
break;
|
||||
}//*/
|
||||
|
||||
if (c == '{' || c == '[')
|
||||
if (c == '{' || c == '[') {
|
||||
zclear(¶m);
|
||||
where_stack[++tex_level] = IN_TAGPARM;
|
||||
|
||||
else if (c == '}' || c == ']') {
|
||||
} else if (c == '}' || c == ']') {
|
||||
where_stack[tex_level--] = IN_UNDEF;
|
||||
i--;
|
||||
|
||||
|
|
Loading…
Reference in New Issue