Browse Source

Format length specifier added.

release/0.19
JustinAJ 11 years ago
parent
commit
fa77b0be7e
  1. 4
      Jupiter/Socket.cpp

4
Jupiter/Socket.cpp

@ -178,7 +178,7 @@ bool Jupiter::Socket::connectToHost(const char *hostname, unsigned short iPort,
Jupiter::Socket::data_->port = iPort;
int i = 0;
static char portString[256];
sprintf(portString, "%u", Jupiter::Socket::data_->port);
sprintf(portString, "%hu", Jupiter::Socket::data_->port);
addrinfo *info = Jupiter::Socket::getAddrInfo(Jupiter::Socket::data_->host, portString);
while (info != nullptr)
{
@ -213,7 +213,7 @@ bool Jupiter::Socket::bindToPort(const char *hostname, unsigned short iPort, boo
Jupiter::Socket::data_->port = iPort;
int i = 0;
static char portString[256];
sprintf(portString, "%u", Jupiter::Socket::data_->port);
sprintf(portString, "%hu", Jupiter::Socket::data_->port);
addrinfo *info = Jupiter::Socket::getAddrInfo(Jupiter::Socket::data_->host, portString);
while (info != nullptr)
{

Loading…
Cancel
Save