Fixed a bug caused while highlighting double quoted strings. For e.g. ls "abc" shows up as invalid write for color of closing quote in valgrind.

This commit is contained in:
Siteshwar Vashisht 2012-02-07 21:37:53 +05:30
parent 382ffe9b6a
commit e8af86017a

View file

@ -2443,7 +2443,7 @@ static void reader_super_highlight_me_plenty( int match_highlight_pos, array_lis
{
reader_sanity_check();
int *color = (int *)calloc(data->buff_count, sizeof *color);
int *color = (int *)calloc(data->buff_count + 1, sizeof *color);
background_highlight_context_t *ctx = new background_highlight_context_t(data->command_line, color, match_highlight_pos, data->highlight_function);
#if 1
iothread_perform(threaded_highlight, highlight_complete, ctx);