mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(diff): add NULL check
This commit is contained in:
@@ -161,6 +161,9 @@ void fastforward_buf_to_lnum(const char **s, long lnum)
|
||||
{
|
||||
for (long i = 0; i < lnum - 1; i++) {
|
||||
*s = strchr(*s, '\n');
|
||||
if (!*s) {
|
||||
return;
|
||||
}
|
||||
(*s)++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user