@@ -174,11 +174,11 @@ Tk_DrawTextLayout(Tk_Display(tkwin), d, gc1, text->textLayout, b.x, b.y, 0/*firstChar*/, -1/*lastChar*/); if (text->underlineObj != NULL) { TkGetIntForIndex(text->underlineObj, TCL_INDEX_END, 0, &underline); - if (underline != TCL_INDEX_NONE) { + if (underline >= 0) { if ((size_t)underline > (size_t)TCL_INDEX_END>>1) { underline++; } if (text->embossed) { Tk_UnderlineTextLayout(Tk_Display(tkwin), d, gc2,