mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Make sure line counting doesn't move past end of string
darcs-hash:20060206134757-ac50b-2e80cf3ec104f7b40babef5260fb1d5435dbc74d.gz
This commit is contained in:
@@ -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' )
|
||||
res++;
|
||||
|
||||
Reference in New Issue
Block a user