idnode: temporary workaround for the static string comparison issue

This commit is contained in:
Adam Sutton 2013-10-15 22:18:25 +01:00
parent 7d116966c8
commit ce48eeb9d4

View file

@ -488,7 +488,7 @@ idnode_cmp_sort
case PT_STR:
{
int r;
const char *stra = idnode_get_str(ina, sort->key);
const char *stra = strdupa(idnode_get_str(ina, sort->key) ?: "");
const char *strb = idnode_get_str(inb, sort->key);
if (sort->dir == IS_ASC)
r = strcmp(stra ?: "", strb ?: "");