diff options
author | fvogel <fvogelnew1@free.fr> | 2021-05-01 15:24:53 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2021-05-01 15:24:53 (GMT) |
commit | bb3ed14ab0f5a5390e889288824d73fec81f2bc0 (patch) | |
tree | d006166e604ddb34de00a9489c4b1ba8e06ea0b1 | |
parent | a46311e3fb1f2a60c13e4d6138d6264f7624e54f (diff) | |
download | tk-bb3ed14ab0f5a5390e889288824d73fec81f2bc0.zip tk-bb3ed14ab0f5a5390e889288824d73fec81f2bc0.tar.gz tk-bb3ed14ab0f5a5390e889288824d73fec81f2bc0.tar.bz2 |
Refine previous fix
-rw-r--r-- | generic/ttk/ttkEntry.c | 5 |
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; |