summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authorgriffin <briang42@easystreet.net>2022-08-17 22:32:34 (GMT)
committergriffin <briang42@easystreet.net>2022-08-17 22:32:34 (GMT)
commit9a179b641897fc4e631dfe3dbd737d864f5df96d (patch)
tree0e9ec57e38309fbb4d78bc0736c6ebffa7593797 /generic/tclListObj.c
parent2439b064ea3e521e50f6c7bd43ef0a69d183bff9 (diff)
downloadtcl-9a179b641897fc4e631dfe3dbd737d864f5df96d.zip
tcl-9a179b641897fc4e631dfe3dbd737d864f5df96d.tar.gz
tcl-9a179b641897fc4e631dfe3dbd737d864f5df96d.tar.bz2
Bug fixes
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 37d941d..6b5ab7e 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -2347,9 +2347,12 @@ TclNewArithSeriesObj(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_W
Tcl_Obj *arithSeriesPtr;
ArithSeries *arithSeriesRepPtr;
- if (length == -1) return NULL; /* Invalid range error */
TclNewObj(arithSeriesPtr);
+ if (length <= 0) {
+ return arithSeriesPtr;
+ }
+
arithSeriesRepPtr = (ArithSeries*) ckalloc(sizeof (ArithSeries));
arithSeriesRepPtr->start = start;
arithSeriesRepPtr->end = end;