diff --git a/src/sqlitetypes.cpp b/src/sqlitetypes.cpp index 1cc251f0..7c744fbd 100644 --- a/src/sqlitetypes.cpp +++ b/src/sqlitetypes.cpp @@ -312,8 +312,10 @@ Table CreateTableWalker::table() int fieldindex = tab.findField(col); if(fieldindex != -1) tab.fields().at(fieldindex)->setPrimaryKey(true); - tc = tc->getNextSibling(); // skip ident and comma - tc = tc->getNextSibling(); + do + { + tc = tc->getNextSibling(); // skip ident and comma + } while(tc->getType() == sqlite3TokenTypes::COMMA); } while(tc != antlr::nullAST && tc->getType() != sqlite3TokenTypes::RPAREN); } break;