facebookarchive / RakNet

RakNet is a cross platform, open source, C++ networking engine for game programmers.
Other
3.3k stars 1.02k forks source link

Fix: RakString::Assign error when the _vsnprintf() length is larger than 512 in Linux. #60

Open lenky0401 opened 9 years ago

lenky0401 commented 9 years ago

Just a typo error, i think.

Luke1410 commented 7 years ago

Based on this pull request we integrated a slightly different approach in https://github.com/SLikeSoft/SLikeNet (incorporated in SLikeNet 0.1.0).

Instead of calling strlen() on the correct variable, we evaluate the return value of vsnprintf(). This should also take care about the issue of the proposed pull request here, if the resulting string would be exactly 511 characters long.