Commit 3d4991c9 authored by jan.koester's avatar jan.koester
Browse files

corrected llop for appendChild

parent 1bba27cc
Loading
Loading
Loading
Loading
+3 −2
Changes for src/html.cpp: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -485,10 +485,11 @@ void libhtmlpp::HtmlElement::insertChild(libhtmlpp::Element* el){
void libhtmlpp::HtmlElement::appendChild(libhtmlpp::Element* el){
    if(_childElement){
        Element *curel=_childElement,*prev=nullptr;
        while(curel){
        do{
            prev=curel;
            curel=curel->nextElement();
        }
        }while(curel);

        if(el->getType()==HtmlEl)
            curel=new HtmlElement;
        else if(el->getType()==TextEl)