Index: src_plugins/io_lihata/read.c =================================================================== --- src_plugins/io_lihata/read.c (revision 11966) +++ src_plugins/io_lihata/read.c (revision 11967) @@ -1369,6 +1369,7 @@ int res; char *errmsg, *realfn; lht_doc_t *doc = NULL; + pcb_board_t *old_pcb; realfn = pcb_fopen_check(Filename, "r"); if (realfn != NULL) @@ -1380,6 +1381,10 @@ return -1; } +#warning TODO#5: not faking PCB would trigger layer binding bugs because the "is bound" flag is not explicit in pcb_layer_t + old_pcb = PCB; + PCB = Ptr; + if ((doc->root->type == LHT_HASH) && (strncmp(doc->root->name, "pcb-rnd-board-v", 15) == 0)) { res = parse_board(Ptr, doc->root); } @@ -1400,6 +1405,8 @@ res = -1; } + PCB = old_pcb; + lht_dom_uninit(doc); return res; }