From ebd4e654efdaa641a1cf378ca80fa349526982e0 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Mon, 27 Jun 2011 15:54:00 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=20523-=D0=B5=D0=B3=D0=BE=20#=20?= =?UTF-8?q?=D0=B4=D0=BE=D1=88=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c/tex_parser/tex_table.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/c/tex_parser/tex_table.c b/c/tex_parser/tex_table.c index 2116de4..6c36796 100644 --- a/c/tex_parser/tex_table.c +++ b/c/tex_parser/tex_table.c @@ -213,6 +213,7 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str } else { where_stack[tex_level--] = IN_UNDEF; + i--; } break; @@ -243,9 +244,7 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str break; case IN_TAG_UNKNOWN: - if (isspace(c)) { - - } else if (c == '{' || c == '[') { // tag params + if (c == '{' || c == '[') { // tag params where_stack[++tex_level] = IN_TAGPARM; } else if (c == '\\') { // new tag @@ -258,6 +257,9 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str } else if (isspace(c)) { where_stack[++tex_level] = IN_SPACE; + } else if (c == '}') { + where_stack[tex_level--] = IN_UNDEF; + } else { error->code = (int)i; error->message = "unexpected symbol (IN_TAG_UNKNOWN)";