@ -1,5 +1,6 @@
#include "pullpush.h"
#include "varint.h"
#include <assert.h>
#include <ccan/endian/endian.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/tal.h>
@ -58,6 +59,7 @@ const u8 *pull(const u8 **cursor, size_t *max, void *copy, size_t n)
}
*cursor += n;
*max -= n;
assert(p);
if (copy)
memcpy(copy, p, n);
return memcheck(p, n);