summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvText.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-18 14:15:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-18 14:15:49 (GMT)
commit9bd0f9a676dc8cf52d4f73b0cf766d4643b64956 (patch)
treef23e6916460d21f4cdab3544051f4c297ef9007b /generic/tkCanvText.c
parent3eac0e260bf334098c61c36eff9890b2c97a52b3 (diff)
parentc00e981adab518faf0a905cb261fbddae340d33f (diff)
downloadtk-9bd0f9a676dc8cf52d4f73b0cf766d4643b64956.zip
tk-9bd0f9a676dc8cf52d4f73b0cf766d4643b64956.tar.gz
tk-9bd0f9a676dc8cf52d4f73b0cf766d4643b64956.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r--generic/tkCanvText.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 27f162a..aaf7c14 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -120,13 +120,11 @@ UnderlineParseProc(
obj.bytes = (char *)value;
obj.length = strlen(value);
obj.typePtr = NULL;
- code = TkGetIntForIndex(&obj, TCL_INDEX_END, 0, &underline);
+ code = TkGetIntForIndex(&obj, TCL_INDEX_NONE, 0, &underline);
if (code == TCL_OK) {
- if (underline < 0) {
- underline = (Tcl_Size)INT_MIN;
- } else if ((size_t)underline > (size_t)TCL_INDEX_END>>1) {
- underline++;
- } else if (underline >= INT_MAX) {
+ if (underline < INT_MIN) {
+ underline = INT_MIN;
+ } else if (underline > INT_MAX) {
underline = INT_MAX;
}
*underlinePtr = (int)underline;