diff options
Diffstat (limited to 'generic/tclBasic.c')
| -rw-r--r-- | generic/tclBasic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 94d464f..f8249ee 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -731,7 +731,8 @@ buildInfoObjCmd2( } return TCL_OK; case ID_COMPILER: - for (p = strchr(buildData, '.'); p++; p = strchr(p, '.')) { + for (p = strchr(buildData, '.'); p != NULL; p = strchr(p, '.')) { + p++; /* * Does the word begin with one of the standard prefixes? */ @@ -752,7 +753,8 @@ buildInfoObjCmd2( break; default: /* Boolean test for other identifiers' presence */ arg = TclGetStringFromObj(objv[1], &len); - for (p = strchr(buildData, '.'); p++; p = strchr(p, '.')) { + for (p = strchr(buildData, '.'); p != NULL; p = strchr(p, '.')) { + p++; if (!strncmp(p, arg, len) && ((p[len] == '.') || (p[len] == '-') || (p[len] == '\0'))) { if (p[len] == '-') { |
