From 07b7563e0748b1aff6f4d28b0172095b2fdcdfcc Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Tue, 5 Nov 2013 13:47:12 +0100 Subject: Added netlist simplification passes (not yet quite complete !) --- csim/load.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'csim/load.c') diff --git a/csim/load.c b/csim/load.c index a7e6cac..7971a71 100644 --- a/csim/load.c +++ b/csim/load.c @@ -35,10 +35,10 @@ t_value read_bool(FILE *stream, t_value *mask) { void read_arg(FILE *stream, t_arg *dest) { dest->mask = 0; - if (fscanf(stream, "$") > 0) { - dest->Val = read_bool(stream, &dest->mask); + if (fscanf(stream, "$%d ", &(dest->SrcVar))) { + // ok, value is read } else { - fscanf(stream, "%d ", &(dest->SrcVar)); + dest->Val = read_bool(stream, &dest->mask); } } -- cgit v1.2.3