NAME_MAX fix
This commit is contained in:
parent
3d9c8f1b2d
commit
e43dacb275
|
@ -178,7 +178,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#else
|
||||
// this is the maximum number of characters in a
|
||||
// path element / filename on windows
|
||||
#define NAME_MAX 255
|
||||
#define TORRENT_MAX_PATH 255
|
||||
#warning unknown platform, assuming the longest path is 255
|
||||
|
||||
#endif
|
||||
|
|
|
@ -268,7 +268,7 @@ namespace libtorrent
|
|||
if (!need_encoding(path.c_str(), path.size()))
|
||||
return url;
|
||||
|
||||
char msg[NAME_MAX*4];
|
||||
char msg[TORRENT_MAX_PATH*4];
|
||||
snprintf(msg, sizeof(msg), "%s://%s%s%s:%d%s", protocol.c_str(), auth.c_str()
|
||||
, auth.empty()?"":"@", host.c_str(), port
|
||||
, escape_path(path.c_str(), path.size()).c_str());
|
||||
|
|
Loading…
Reference in New Issue