aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@xglobe.in>2020-04-03 19:41:52 +0200
committerOmar Polo <op@xglobe.in>2020-04-03 19:41:52 +0200
commit19fc5ad595c28a17c9eed3f697e8a47ca68538d0 (patch)
tree264dffe66b767afd0950a352379cfa93dadbcfd7
parent9a0497ff1c0c15dcb7b27fa7964b3b1e4dacc6b1 (diff)
downloadtext-adventure-19fc5ad595c28a17c9eed3f697e8a47ca68538d0.tar.gz
text-adventure-19fc5ad595c28a17c9eed3f697e8a47ca68538d0.tar.bz2
use par->tag instead of par->obj->tags[0]
par->tag is what the user typed, that may or may not be equal to par->obj->tags[0]. This improves the consistency. That code was written prior to the introduction of the struct param and thus used object->tags.
-rw-r--r--inventory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/inventory.c b/inventory.c
index ca1f2ed..ce8f052 100644
--- a/inventory.c
+++ b/inventory.c
@@ -15,7 +15,7 @@ move_object(struct param *par, struct object *from, struct object *to)
printf("There is nobody here to give that to.\n");
else if (obj == to)
printf("What's the meaning of putting a %s inside itself?\n",
- obj->tags[0]);
+ par->tag);
else if (from != obj->location) {
/* give the appropriate error message */
switch (dist) {