You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2008/09/21 17:39:35 UTC

svn commit: r697529 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

Author: mturk
Date: Sun Sep 21 08:39:35 2008
New Revision: 697529

URL: http://svn.apache.org/viewvc?rev=697529&view=rev
Log:
Make sure only single digits are taken for boolean values

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=697529&r1=697528&r2=697529&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Sep 21 08:39:35 2008
@@ -324,13 +324,13 @@
     else if (!strcasecmp(v, "off") ||
              *v == 'F' || *v == 'f' ||
              *v == 'N' || *v == 'n' ||
-             *v == '0') {
+            (*v == '0' && *(v + 1) == '\0')) {
         return 0;
     }
     else if (!strcasecmp(v, "on") ||
              *v == 'T' || *v == 't' ||
              *v == 'Y' || *v == 'y' ||
-             *v == '1') {
+            (*v == '1' && *(v + 1) == '\0')) {
         return 1;
     }
     return def;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org