Sort eval vars when calling r_config_lock(). Useful for 'Ve'

This commit is contained in:
pancake 2014-06-13 22:40:03 +02:00
parent 3e5eb05eda
commit ad52617443
2 changed files with 6 additions and 1 deletions

View File

@ -324,7 +324,12 @@ R_API int r_config_eval(RConfig *cfg, const char *str) {
return R_TRUE;
}
static int cmp(RConfigNode *a, RConfigNode *b) {
return strcmp (a->name, b->name);
}
R_API void r_config_lock(RConfig *cfg, int l) {
r_list_sort (cfg->nodes, (RListComparator)cmp);
cfg->lock = l;
}

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2009-2013 - pancake */
/* radare - LGPL - Copyright 2009-2014 - pancake */
#include "r_core.h"