Переглянути джерело

Fix test if select result is not empty for select function returning empty string with result=0, res.len=0.

Michal Matyska 19 роки тому
батько
коміт
270757bb54
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      route.c

+ 1 - 1
route.c

@@ -816,7 +816,7 @@ inline static int comp_select(int op, select_t* sel, int rtype, union exp_op* r,
 	if (ret > 0) return 0;
 	if (ret > 0) return 0;
 
 
 	switch(op) {
 	switch(op) {
-	case NO_OP: return 1;
+	case NO_OP: return (val.len>0);
 	case BINOR_OP:
 	case BINOR_OP:
 	case BINAND_OP:
 	case BINAND_OP:
 		ERR("Binary operators cannot be used with string selects\n");
 		ERR("Binary operators cannot be used with string selects\n");