Quellcode durchsuchen

Fix re-setting of ptype range

Intention here is to update ptypes from scripting plugins.

In my experience this works fine.
Ingo Albrecht vor 7 Jahren
Ursprung
Commit
429a5aae03
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  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) {
 	/*------------------------------------------------- */