diff options
author | dgp@users.sourceforge.net <dgp> | 2015-02-06 16:35:48 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2015-02-06 16:35:48 (GMT) |
commit | 40da01824e19e597b92a1c16d621962b0b8ce6db (patch) | |
tree | 7943e3d2dbe555429b25b405ab27eb356671895c | |
parent | 7b43517da58ae06b61467a8abbcbf89b958f56a6 (diff) | |
parent | 472dbf8ac966d002600059d8537b990f1d60f9af (diff) | |
download | tk-40da01824e19e597b92a1c16d621962b0b8ce6db.zip tk-40da01824e19e597b92a1c16d621962b0b8ce6db.tar.gz tk-40da01824e19e597b92a1c16d621962b0b8ce6db.tar.bz2 |
merge 8.5
-rw-r--r-- | generic/tkEntry.c | 4 | ||||
-rw-r--r-- | generic/tkGrid.c | 4 | ||||
-rw-r--r-- | generic/tkTextIndex.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 816b7fa..6683cdc 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1330,7 +1330,7 @@ ConfigureEntry( double dvalue; - if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) { + if (sscanf(entryPtr->string, "%lf", &dvalue) <= 0) { /* Scan failure */ dvalue = sbPtr->fromValue; } else { @@ -4231,7 +4231,7 @@ SpinboxInvoke( } else if (!DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)) { double dvalue; - if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) { + if (sscanf(entryPtr->string, "%lf", &dvalue) <= 0) { /* * If the string doesn't scan as a double value, just * use the -from value diff --git a/generic/tkGrid.c b/generic/tkGrid.c index c6a00d5..ccdde19 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -1991,7 +1991,7 @@ ResolveConstraints( if (slavePtr->numCols > 1) { slavePtr->binNextPtr = layoutPtr[rightEdge].binNextPtr; layoutPtr[rightEdge].binNextPtr = slavePtr; - } else { + } else if (rightEdge >= 0) { int size = slavePtr->size + layoutPtr[rightEdge].pad; if (size > layoutPtr[rightEdge].minSize) { @@ -2010,7 +2010,7 @@ ResolveConstraints( if (slavePtr->numRows > 1) { slavePtr->binNextPtr = layoutPtr[rightEdge].binNextPtr; layoutPtr[rightEdge].binNextPtr = slavePtr; - } else { + } else if (rightEdge >= 0) { int size = slavePtr->size + layoutPtr[rightEdge].pad; if (size > layoutPtr[rightEdge].minSize) { diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 25b4666..13f3957 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -774,11 +774,11 @@ GetIndex( } if (TkTextWindowIndex(textPtr, string, indexPtr) != 0) { - return TCL_OK; + goto done; } if (TkTextImageIndex(textPtr, string, indexPtr) != 0) { - return TCL_OK; + goto done; } /* |