forked from mirrors/kolyah35-minecraft-pe-0.6.1
Replaced std::stoi(port) with atoi(port.c_str()) call because of Android NDK
This commit is contained in:
parent
4bd3821ff6
commit
1e908423d5
1 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
#include "Minecraft.h"
|
#include "Minecraft.h"
|
||||||
#include "client/player/input/IBuildInput.h"
|
#include "client/player/input/IBuildInput.h"
|
||||||
|
#include <string>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
#if defined(APPLE_DEMO_PROMOTION)
|
#if defined(APPLE_DEMO_PROMOTION)
|
||||||
#define NO_NETWORK
|
#define NO_NETWORK
|
||||||
|
|
@ -1302,12 +1304,12 @@ bool Minecraft::joinMultiplayerFromString( const std::string& server )
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s \n", port.c_str());
|
printf("%s \n", port.c_str());
|
||||||
|
|
||||||
if (isLookingForMultiplayer && netCallback) {
|
if (isLookingForMultiplayer && netCallback) {
|
||||||
isLookingForMultiplayer = false;
|
isLookingForMultiplayer = false;
|
||||||
char *endptr;
|
|
||||||
printf("test");
|
printf("test");
|
||||||
return raknetInstance->connect(ip.c_str(), strtol(port.c_str(), &endptr, 10));
|
int portNum = atoi(port.c_str());
|
||||||
|
return raknetInstance->connect(ip.c_str(), portNum);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue