Skip to content

Commit

Permalink
c_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
timriker committed Jul 25, 2023
1 parent 4a85a90 commit fb6441d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bzflag/bzflag.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static void parse(int argc, char** argv)
callsign = callsign.substr(0, passSplit);
}
if (!splitNamePort(argument.substr(atSplit + 1, argument.length() - atSplit), serverName, startupInfo.serverPort))
printFatalError("Unable to parse server name %s", namePort);
printFatalError("Unable to parse server name %s", namePort.c_str());
// length checks and always truncate everything after the max length
if (callsign.length() > sizeof(startupInfo.callsign))
{
Expand All @@ -456,7 +456,7 @@ static void parse(int argc, char** argv)
else // there is no callsign/password so only a destination
{
if (!splitNamePort(argument, serverName, startupInfo.serverPort))
printFatalError("Unable to parse server name %s", namePort);
printFatalError("Unable to parse server name %s", namePort.c_str());

// sanity check for length
if (serverName.length() > sizeof(startupInfo.serverName))
Expand Down

0 comments on commit fb6441d

Please sign in to comment.