summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-02-06 16:35:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-02-06 16:35:48 (GMT)
commit7fa5cdb9c367a0587e135892aa12345045fb2b92 (patch)
tree2e399b6ac70b26c14f70092ed8efc1f4fa0e82da
parentcd43dc5d400d4646a76dfdb37a555d7c8d6bda6b (diff)
parente9043031de3669be8a342498ecbc78cfdc67f054 (diff)
downloadtk-7fa5cdb9c367a0587e135892aa12345045fb2b92.zip
tk-7fa5cdb9c367a0587e135892aa12345045fb2b92.tar.gz
tk-7fa5cdb9c367a0587e135892aa12345045fb2b92.tar.bz2
merge 8.5
-rw-r--r--generic/tkEntry.c4
-rw-r--r--generic/tkGrid.c4
-rw-r--r--generic/tkTextIndex.c4
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;
}
/*