Commit bc0f4a82 authored by jan.koester's avatar jan.koester
Browse files

chrash fixed

parent e15d8966
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -79,7 +79,8 @@ namespace libhtmlpp {
        "footer",
        "header",
        "main",
        "html"
        "html",
        ""
    };

    class DocElements {
@@ -274,7 +275,7 @@ void libhtmlpp::HtmlString::_buildtreenode(
    Element *prev_el_in_tree = nullptr;

    auto checkContainer = [&](const std::string &tag) {
        for (size_t i = 0; i<sizeof(ContainerTypes); ++i) {
        for (size_t i = 0; !ContainerTypes[i].empty(); ++i) {
            if (tag == ContainerTypes[i]) {
                return true;
            }
@@ -1594,7 +1595,7 @@ void libhtmlpp::print(const Element &element, HtmlString &output,bool formated)
    const Element *el=&element;

    auto isContainer = [](const std::string &tagname) {
        for(size_t i=0; i<sizeof(ContainerTypes); ++i){
        for(size_t i=0; !ContainerTypes[i].empty(); ++i){
            if(tagname==ContainerTypes[i])
                return true;
        }