From: David Given Date: Tue, 24 Jan 2017 22:04:33 +0000 (+0100) Subject: Don't crash trying to dump move hops (with no output value). X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=cb0a00c9e7bd5fab09ce481f07bc589b3f9bf0c0;p=ack.git Don't crash trying to dump move hops (with no output value). --- diff --git a/mach/proto/mcg/hop.c b/mach/proto/mcg/hop.c index d36fa6fc8..d4884f7a7 100644 --- a/mach/proto/mcg/hop.c +++ b/mach/proto/mcg/hop.c @@ -293,7 +293,9 @@ static void appendheader(struct hop* hop) { int i; - appendf("$%d.%d", hop->value->ir->id, hop->value->subid); + appendf("%d: ", hop->id); + if (hop->value) + appendf("$%d.%d", hop->value->ir->id, hop->value->subid); if (hop->ir) appendf(" from $%d", hop->ir->id); appendf(":");