Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .clang-format

This file was deleted.

6 changes: 3 additions & 3 deletions src/el_li.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/html_tag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down