summaryrefslogtreecommitdiffstats
path: root/generic/tclArithSeries.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclArithSeries.c')
-rwxr-xr-xgeneric/tclArithSeries.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c
index b6ea45b..415c85a 100755
--- a/generic/tclArithSeries.c
+++ b/generic/tclArithSeries.c
@@ -610,7 +610,7 @@ TclArithSeriesObjIndex(
ArithSeries *arithSeriesRepPtr = ArithSeriesGetInternalRep(arithSeriesObj);
if (index < 0 || arithSeriesRepPtr->len <= index) {
- *elemObj = Tcl_NewObj();
+ *elemObj = NULL;
} else {
/* List[i] = Start + (Step * index) */
if (arithSeriesRepPtr->isDouble) {
@@ -1183,8 +1183,8 @@ ArithSeriesInOperation(
Tcl_Obj *elemObj;
index = (y - intRepPtr->start) / intRepPtr->step;
TclArithSeriesObjIndex(interp, arithSeriesObjPtr, index, &elemObj);
- char *vstr = Tcl_GetStringFromObj(valueObj, &vlen);
- char *estr = Tcl_GetStringFromObj(elemObj, &elen);
+ char const *vstr = Tcl_GetStringFromObj(valueObj, &vlen);
+ char const *estr = elemObj ? Tcl_GetStringFromObj(elemObj, &elen) : "";
if (boolResult) {
*boolResult = (elen == vlen) ? (memcmp(estr, vstr, elen) == 0) : 0;
}