comparison directive.c @ 62:90c6052410ce

Don't truncate the candidate include path strings. It causes malloc debug assertions.
author David A. Holland
date Sun, 31 Mar 2013 01:27:46 -0400
parents 8a204d153398
children f50b4ea6cbfe
comparison
equal deleted inserted replaced
61:cf4c97cebbd9 62:90c6052410ce
277 tryinclude(struct place *p, char *line, size_t len) 277 tryinclude(struct place *p, char *line, size_t len)
278 { 278 {
279 if (len > 2 && line[0] == '"' && line[len-1] == '"') { 279 if (len > 2 && line[0] == '"' && line[len-1] == '"') {
280 line[len-1] = '\0'; 280 line[len-1] = '\0';
281 file_readquote(p, line+1); 281 file_readquote(p, line+1);
282 line[len-1] = '"';
282 return true; 283 return true;
283 } 284 }
284 if (len > 2 && line[0] == '<' && line[len-1] == '>') { 285 if (len > 2 && line[0] == '<' && line[len-1] == '>') {
285 line[len-1] = '\0'; 286 line[len-1] = '\0';
286 file_readbracket(p, line+1); 287 file_readbracket(p, line+1);
288 line[len-1] = '>';
287 return true; 289 return true;
288 } 290 }
289 return false; 291 return false;
290 } 292 }
291 293