浏览代码

Fix re-setting of ptype range

Intention here is to update ptypes from scripting plugins.

In my experience this works fine.
Ingo Albrecht 7 年之前
父节点
当前提交
429a5aae03
共有 1 个文件被更改,包括 6 次插入0 次删除
  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) {
 	/*------------------------------------------------- */