diff --git a/.clang-format b/.clang-format deleted file mode 100644 index e3967e6a9..000000000 --- a/.clang-format +++ /dev/null @@ -1,3 +0,0 @@ -# LLVM,Google,Chromium,Mozilla,WebKit,Microsoft -BasedOnStyle: Google -ColumnLimit: 1000 \ No newline at end of file diff --git a/src/el_li.cpp b/src/el_li.cpp index 02b7d4e72..7ce21f71c 100644 --- a/src/el_li.cpp +++ b/src/el_li.cpp @@ -14,17 +14,17 @@ int litehtml::el_li::render(int x, int y, int max_width, bool second_pass) { const auto hasStart = p->get_attr(_t("start")); const int start = hasStart ? t_atoi(hasStart) : 1; - tchar_t val[2] = { (tchar_t)start, 0 }; + int val = start; for (int i = 0, n = (int)p->get_children_count(); i < n; ++i) { auto child = p->get_child(i); if (child.get() == this) { - set_attr(_t("list_index"), val); + set_attr(_t("list_index"), t_to_string(val).c_str()); break; } else if (!t_strcmp(child->get_tagName(), _t("li"))) - ++val[0]; + ++val; } } diff --git a/src/html_tag.cpp b/src/html_tag.cpp index 6d652d4e2..cc10cd0d2 100644 --- a/src/html_tag.cpp +++ b/src/html_tag.cpp @@ -2969,7 +2969,7 @@ void litehtml::html_tag::draw_list_marker( uint_ptr hdc, const position &pos ) { lm.pos.y = pos.y; lm.pos.height = pos.height; - lm.index = (unsigned char) get_attr(_t("list_index"), _t(""))[0]; + lm.index = t_atoi(get_attr(_t("list_index"), _t("0"))); } else {