1
0
mirror of https://github.com/fumiama/simple-protobuf.git synced 2026-06-09 10:30:27 +08:00

增加实际读取长度

This commit is contained in:
fumiama
2021-05-18 23:09:23 +08:00
parent 7de841dba1
commit a8d503137e
4 changed files with 6 additions and 2 deletions

1
test.c
View File

@@ -34,6 +34,7 @@ int main() {
SIMPLE_PB* spb = get_pb(fp);
memcpy(&t, spb->target, sizeof(struct TEST));
printf("a:%u\nb:%u\nc:%u\nd:%llu\ne:%s\n", t.a, t.b, t.c, t.d, t.e);
printf("Struct size: %u, read: %u\n", spb->struct_len, spb->real_len);
} else perror("[SPB]");
} else perror("[SPB]");
}