Browse Source

Fix re-setting of ptype range

Intention here is to update ptypes from scripting plugins.

In my experience this works fine.
Ingo Albrecht 7 years ago
parent
commit
429a5aae03
1 changed files with 6 additions and 0 deletions
  1. 6 0
      clish/ptype/ptype.c

+ 6 - 0
clish/ptype/ptype.c

@@ -154,6 +154,12 @@ static void clish_ptype__set_range(clish_ptype_t * this)
 {
 	char tmp[80];
 
+	/* Clear the range */
+	if (this->range) {
+		lub_string_free(this->range);
+		this->range = NULL;
+	}
+
 	/* Now set up the range values */
 	switch (this->method) {
 	/*------------------------------------------------- */