aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/undo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 2a86cc1fea..7dd101cb90 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -891,7 +891,7 @@ static u_header_T *unserialize_uhp(bufinfo_T *bi,
for (;; ) {
int len = undo_read_byte(bi);
- if (len == 0) {
+ if (len == 0 || len == EOF) {
break;
}
int what = undo_read_byte(bi);