Browse code

- if select is unfixable print just the part of text which was parsed

Michal Matyska authored on 07/01/2008 12:33:52
Showing 1 changed files
... ...
@@ -134,12 +134,12 @@ int w_parse_select(char**p, select_t* sel)
134 134
 		(*p)++;
135 135
 	};
136 136
 	if (sel->n==0) {
137
-		ERR("parse_select: invalid select '%s'\n", select_name);
137
+		ERR("parse_select: invalid select '%.*s'\n", *p - select_name, select_name);
138 138
 		goto error;
139 139
 	};
140 140
 	DBG("parse_select: end, total elements: %d, calling resolve_select\n", sel->n);
141 141
 	if (resolve_select(sel)<0) {
142
-		ERR("parse_select: error while resolve_select '%s'\n", select_name);
142
+		ERR("parse_select: error while resolve_select '%.*s'\n", *p - select_name, select_name);
143 143
 		goto error;
144 144
 	}
145 145
 	return 0;