Index: work/alien_formats/altium/pcbdoc_bin.c =================================================================== --- work/alien_formats/altium/pcbdoc_bin.c (revision 35455) +++ work/alien_formats/altium/pcbdoc_bin.c (revision 35456) @@ -60,6 +60,7 @@ return -1; tmp->data[len] = '\0'; /* safety: always make it a valid string just in case it is text */ + tmp->used = len+1; return len; } @@ -66,7 +67,7 @@ static int pcbdoc_bin_parse_ascii(rnd_hidlib_t *hidlib, altium_tree_t *tree, const char *record, altium_buf_t *tmp) { -#warning TODO: take over tmp's buff and make it a block +#warning TODO: take over tmps buff and make it a block return 0; } Index: work/alien_formats/altium/pcbdoc_bin.h =================================================================== --- work/alien_formats/altium/pcbdoc_bin.h (revision 35455) +++ work/alien_formats/altium/pcbdoc_bin.h (revision 35456) @@ -1,4 +1,4 @@ typedef struct { - long alloced; + long alloced, used; unsigned char *data; } altium_buf_t;