mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
fix(coverity/433537): don't call kv_concat_len() when read_size is 0 (#21664)
fix(coverity): don't call kv_concat_len() when read_size is 0
This commit is contained in:
@@ -1738,7 +1738,9 @@ bool nlua_exec_file(const char *path)
|
|||||||
if (read_size < 0) { // Error.
|
if (read_size < 0) { // Error.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (read_size > 0) {
|
||||||
kv_concat_len(sb, IObuff, (size_t)read_size);
|
kv_concat_len(sb, IObuff, (size_t)read_size);
|
||||||
|
}
|
||||||
if (read_size < 64) { // EOF.
|
if (read_size < 64) { // EOF.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user