summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-05-01 15:24:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-05-01 15:24:53 (GMT)
commitbb3ed14ab0f5a5390e889288824d73fec81f2bc0 (patch)
treed006166e604ddb34de00a9489c4b1ba8e06ea0b1
parenta46311e3fb1f2a60c13e4d6138d6264f7624e54f (diff)
downloadtk-bb3ed14ab0f5a5390e889288824d73fec81f2bc0.zip
tk-bb3ed14ab0f5a5390e889288824d73fec81f2bc0.tar.gz
tk-bb3ed14ab0f5a5390e889288824d73fec81f2bc0.tar.bz2
Refine previous fix
-rw-r--r--generic/ttk/ttkEntry.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 5a3cc04..36e613e 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1393,10 +1393,9 @@ EntryIndex(
const char *string;
if (TCL_OK == TkGetIntForIndex(indexObj, entryPtr->entry.numChars - 1, 1, &idx)) {
- if ((idx < 0)) {
+ if (idx == TCL_INDEX_NONE) {
idx = 0;
- }
- if (idx > entryPtr->entry.numChars) {
+ } else if (idx > entryPtr->entry.numChars) {
idx = entryPtr->entry.numChars;
}
*indexPtr = idx;