fixed parsing address
Stefan Schuermans

Stefan Schuermans commited on 2011-11-13 20:53:12
Showing 1 changed files, with 2 additions and 2 deletions.

... ...
@@ -62,13 +62,13 @@ bool Udp4Addr::fromStr(const std::string &str)
62 62
   // parse port
63 63
   szPort = strPort.c_str();
64 64
   iPort = strtoul(szPort, &szPortEnd, 10);
65
-  if (*szPort == 0 || szPortEnd != 0)
65
+  if (*szPort == 0 || *szPortEnd != 0)
66 66
     return false;
67 67
 
68 68
   m_addr.sin_family = AF_INET;
69 69
   m_addr.sin_port = htons(iPort);
70 70
   m_addr.sin_addr = iaIp;
71
-  return false;
71
+  return true;
72 72
 }
73 73
 
74 74
 /**
75 75