瀏覽代碼

* Port [3135] to 1.2.13
* Fix set not allowing defaults under the lower limit. (addresses #315)


svn: 3136

Bryan Drewery 19 年之前
父節點
當前提交
56cc84d70e
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/set.c

+ 1 - 0
doc/UPDATES

@@ -5,6 +5,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags
 * Fix cmd_chanset accepting invalid flags
 * Fix Auth system not tracking nick changes correctly. (fixes #318)
 * Fix Auth system not tracking nick changes correctly. (fixes #318)
+* Fix set not allowing defaults under the lower limit. (addresses #315)
 
 
 1.2.12 - http://wraith.shatow.net/milestone/1.2.12
 1.2.12 - http://wraith.shatow.net/milestone/1.2.12
 * Clearing a variable via 'set var -' now resets that variable to default settings. (implements #111)
 * Clearing a variable via 'set var -' now resets that variable to default settings. (implements #111)

+ 1 - 1
src/set.c

@@ -421,7 +421,7 @@ void var_set(variable_t *var, const char *target, const char *datain)
      sanitize the data */
      sanitize the data */
   char *sdata = NULL;
   char *sdata = NULL;
   /* Make a temporary to free at the end */
   /* Make a temporary to free at the end */
-  if (data && strcmp(data, "-")) {
+  if (data && strcmp(data, "-") && (!var->def || (var->def && strcmp(data, var->def)))) {
     sdata = var_sanitize(var, data);
     sdata = var_sanitize(var, data);
     data = sdata;
     data = sdata;
   }
   }