diff --git a/samples/htlbox/htlbox.cpp b/samples/htlbox/htlbox.cpp index a5a87d3431..a1f9757624 100644 --- a/samples/htlbox/htlbox.cpp +++ b/samples/htlbox/htlbox.cpp @@ -476,9 +476,9 @@ wxString MyHtmlListBox::OnGetItem(size_t n) const #else int level = n % 6 + 1; - wxColour clr(abs((int)n - 192) % 256, - abs((int)n - 256) % 256, - abs((int)n - 128) % 256); + wxColour clr((unsigned char)(abs((int)n - 192) % 256), + (unsigned char)(abs((int)n - 256) % 256), + (unsigned char)(abs((int)n - 128) % 256)); wxString label = wxString::Format(_T("") _T("Item %lu")