scanf fix in client_test

This commit is contained in:
arvidn 2015-10-04 10:57:12 -04:00
parent e59d03f684
commit 5c96a35a66
1 changed files with 2 additions and 2 deletions

View File

@ -1050,7 +1050,7 @@ bool handle_alert(libtorrent::session& ses, libtorrent::alert* a
if (!peer.empty()) if (!peer.empty())
{ {
char* port = (char*) strrchr((char*)peer.c_str(), ':'); char* port = (char*) strrchr((char*)peer.c_str(), ':');
if (port > 0) if (port != NULL)
{ {
*port++ = 0; *port++ = 0;
char const* ip = peer.c_str(); char const* ip = peer.c_str();
@ -1764,7 +1764,7 @@ int main(int argc, char* argv[])
{ {
char url[4096]; char url[4096];
puts("Enter magnet link:\n"); puts("Enter magnet link:\n");
scanf("%4096s", url); scanf("%4095s", url);
add_torrent_params p; add_torrent_params p;
if (seed_mode) p.flags |= add_torrent_params::flag_seed_mode; if (seed_mode) p.flags |= add_torrent_params::flag_seed_mode;