1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

Fix type and logic issues with _libssh2_get_u64

This commit is contained in:
Michael Buckley
2019-03-18 15:04:45 -07:00
parent 41fbd4476a
commit 5b3cac75b5
2 changed files with 3 additions and 3 deletions

View File

@@ -744,7 +744,7 @@ int _libssh2_get_u32(struct string_buf *buf, uint32_t *out)
return 0;
}
int _libssh2_get_u64(struct string_buf *buf, uint64_t *out)
int _libssh2_get_u64(struct string_buf *buf, libssh2_uint64_t *out)
{
if (!_libssh2_check_length(buf, 8)) {
return -1;
@@ -753,7 +753,7 @@ int _libssh2_get_u64(struct string_buf *buf, uint64_t *out)
unsigned char *p = buf->dataptr;
*out = _libssh2_ntohu64(p);
buf->dataptr += 8;
buf->offset -= 8;
buf->offset += 8;
return 0;
}