summaryrefslogtreecommitdiffstats
path: root/generic/tclDate.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclDate.c')
-rw-r--r--generic/tclDate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclDate.c b/generic/tclDate.c
index bfd4ccf..4c914fc 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -2204,7 +2204,7 @@ LookupWord(
*/
i = strlen(buff) - 1;
- if (buff[i] == 's') {
+ if (i > 0 && buff[i] == 's') {
buff[i] = '\0';
for (tp = UnitsTable; tp->name; tp++) {
if (strcmp(buff, tp->name) == 0) {