mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Make sure line counting doesn't move past end of string
darcs-hash:20060206134757-ac50b-2e80cf3ec104f7b40babef5260fb1d5435dbc74d.gz
This commit is contained in:
parent
a521fa4165
commit
530bbfc9ac
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ int parse_util_lineno( const wchar_t *str, int len )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for( ; i<len; i++ )
|
for( ; str[i] && i<len; i++ )
|
||||||
{
|
{
|
||||||
if( str[i] == L'\n' )
|
if( str[i] == L'\n' )
|
||||||
res++;
|
res++;
|
||||||
|
|
Loading…
Reference in a new issue