mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 19:03:38 +08:00
Fix crash bug in token search
darcs-hash:20051211043017-ac50b-137695bd9bb9c523d5b5288a5d4263e4c4242edf.gz
This commit is contained in:
parent
2619f1752d
commit
2cac04850b
6
reader.c
6
reader.c
|
@ -1756,9 +1756,13 @@ void reader_current_token_extent( wchar_t **tok_begin,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( tok_last_type( &tok ) == TOK_STRING )
|
||||||
|
{
|
||||||
pa = begin + tok_get_pos( &tok );
|
pa = begin + tok_get_pos( &tok );
|
||||||
pb = pa + wcslen(tok_last(&tok));
|
pb = pa + wcslen(tok_last(&tok));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fwprintf( stderr, L"Res: %d %d\n", *a-data->buff, *b-data->buff );
|
// fwprintf( stderr, L"Res: %d %d\n", *a-data->buff, *b-data->buff );
|
||||||
free( buffcpy);
|
free( buffcpy);
|
||||||
|
@ -1876,7 +1880,7 @@ static void handle_token_history( int forward, int reset )
|
||||||
int current_pos;
|
int current_pos;
|
||||||
tokenizer tok;
|
tokenizer tok;
|
||||||
|
|
||||||
if(reset )
|
if( reset )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Start a new token search using the current token
|
Start a new token search using the current token
|
||||||
|
|
Loading…
Reference in New Issue
Block a user