From 5126dc09c30891b2f7db68687b88bab1c5e95419 Mon Sep 17 00:00:00 2001 From: Bernd Jendrissek Date: Thu, 30 Jul 2020 02:34:17 +0200 Subject: [PATCH] Print the desired object's description. Previously s_describe_object was returning an object description from 10 calls previously, not the one for the object passed as a parameter. --- libgeda/src/s_basic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c index 7f4934194..643f887be 100644 --- a/libgeda/src/s_basic.c +++ b/libgeda/src/s_basic.c @@ -278,7 +278,7 @@ char *s_describe_object(OBJECT *o, int detail) { static char *s[10]; static int cursor; - char *parent; + char *parent, *description; if (!o) { int i; @@ -317,9 +317,10 @@ char *s_describe_object(OBJECT *o, int detail) g_free(parent); + description = s[cursor]; cursor = (cursor + 1) % 10; - return s[cursor]; + return description; } /*! \todo Finish function documentation!!! -- 2.11.4.GIT