[PC-BSD Commits] r17755 - pcbsd/current/src-qt4/libpcbsd

svn at pcbsd.org svn at pcbsd.org
Mon Jul 16 07:04:09 PDT 2012


Author: kris
Date: 2012-07-16 14:04:09 +0000 (Mon, 16 Jul 2012)
New Revision: 17755

Modified:
   pcbsd/current/src-qt4/libpcbsd/utils.cpp
Log:

Use a toLong to check IPV4, since toInt may fail on larger IPs



Modified: pcbsd/current/src-qt4/libpcbsd/utils.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/utils.cpp	2012-07-16 13:56:42 UTC (rev 17754)
+++ pcbsd/current/src-qt4/libpcbsd/utils.cpp	2012-07-16 14:04:09 UTC (rev 17755)
@@ -803,7 +803,7 @@
   QString tmp;
   tmp = IP;
   tmp.replace(".", "");
-  tmp.toInt(&ok);
+  tmp.toLong(&ok);
   if (!ok)
      return false;
     
@@ -822,7 +822,7 @@
      num = IP.section(".", i,i).toInt(&ok);
      if (!ok)
         return false;
-  
+
      if ( num > 255 || num < 0)
         return false;
   }



More information about the Commits mailing list