1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-23 17:26:28 +02:00

sch2fig/lib.c (lib_exec): component can have unit number 0, which means 1

This happened with XTAL-4-3225 in neo900.lib as the result of merging
multiple units into one component.
This commit is contained in:
Werner Almesberger 2016-07-26 08:42:38 -03:00
parent ab612b4eb2
commit f9c32d4e1e

View File

@ -374,6 +374,8 @@ void lib_exec(const struct comp *comp, unsigned unit, int m[4])
{
const struct obj *obj;
if (!unit)
unit = 1;
for (obj = comp->objs; obj; obj = obj->next) {
if (obj->unit && obj->unit != unit)
continue;