From e3ef50b351fb72b9011e6390ca609c35af6cc148 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Sat, 27 Nov 2010 16:49:44 +0000 Subject: [PATCH] srogue: fix bug causing healing on invalid commands. --- srogue/daemons.c | 2 +- srogue/main.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/srogue/daemons.c b/srogue/daemons.c index 611b671..46417bf 100644 --- a/srogue/daemons.c +++ b/srogue/daemons.c @@ -66,7 +66,7 @@ int fromfuse; swander(fromfuse) int fromfuse; { - daemon(rollwand, TRUE, BEFORE); + daemon(rollwand, TRUE, AFTER); } diff --git a/srogue/main.c b/srogue/main.c index b84fb55..248b445 100644 --- a/srogue/main.c +++ b/srogue/main.c @@ -242,9 +242,14 @@ char **envp; /* Start up daemons and fuses */ daemon(status, TRUE, BEFORE); - daemon(doctor, TRUE, BEFORE); - daemon(stomach, TRUE, BEFORE); daemon(runners, TRUE, AFTER); + /* + * These daemons have been moved to AFTER because BEFORE daemons + * get called every command, even invalid ones. Hopefully this + * won't break anything. + */ + daemon(doctor, TRUE, AFTER); + daemon(stomach, TRUE, AFTER); fuse(swander, TRUE, WANDERTIME); /* Give the rogue his weaponry */