mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6264 from iSevenDays/patch-10
Fix loosing precision: int -> size_t for the return value of `recv`
This commit is contained in:
commit
efd16bc37e
|
@ -853,8 +853,7 @@ void Console::commandUpload(int fd)
|
|||
|
||||
ssize_t Console::readBytes(int fd, char* buffer, size_t maxlen, bool* more)
|
||||
{
|
||||
size_t n;
|
||||
int rc;
|
||||
size_t n, rc;
|
||||
char c, *ptr = buffer;
|
||||
*more = false;
|
||||
for( n = 0; n < maxlen; n++ ) {
|
||||
|
@ -964,8 +963,7 @@ bool Console::parseCommand(int fd)
|
|||
|
||||
ssize_t Console::readline(int fd, char* ptr, size_t maxlen)
|
||||
{
|
||||
size_t n;
|
||||
int rc;
|
||||
size_t n, rc;
|
||||
char c;
|
||||
|
||||
for( n = 0; n < maxlen - 1; n++ ) {
|
||||
|
|
Loading…
Reference in New Issue