diff options
author | dgp <dgp@users.sourceforge.net> | 2015-02-06 16:35:48 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-02-06 16:35:48 (GMT) |
commit | a9bfe45b490814bb208eba3f82dbde80a3905105 (patch) | |
tree | 2e399b6ac70b26c14f70092ed8efc1f4fa0e82da | |
parent | 2b48130c99f29b65813960dbb66ea601d359eb71 (diff) | |
parent | 7a8639a698a6d20055993601f017396c8f440baf (diff) | |
download | tk-a9bfe45b490814bb208eba3f82dbde80a3905105.zip tk-a9bfe45b490814bb208eba3f82dbde80a3905105.tar.gz tk-a9bfe45b490814bb208eba3f82dbde80a3905105.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; } /* |