aboutsummaryrefslogtreecommitdiff
path: root/lib/mpack/read-remaining.c
blob: 46b5815a398a1c3d1c342f14e039df24712907e5 (plain)
1
2
3
4
5
6
7
8
9
10
#include "mpack.h"

size_t mpack_read_remaining_bytes(mpack_reader_t * reader, char * p, size_t count) {
	size_t limit = mpack_reader_remaining(reader, NULL);
	if (0 < count && count < limit)
		limit = count;
	MPACK_MEMCPY(p, reader->data, limit);
	return limit;
}