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