summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2020-07-16 21:12:46 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2020-07-16 21:12:46 -0300
commit905ae13aa12abc3fbbafc646a722b2d38bbeef8f (patch)
tree05643f0a82db0a1f622dac6030b7d4bbc50e21c7
parent4d10bce15ce052e364392d94c3a3a0af602b8e25 (diff)
downloadjet-905ae13aa12abc3fbbafc646a722b2d38bbeef8f.tar.gz
jet-905ae13aa12abc3fbbafc646a722b2d38bbeef8f.zip
Fix client crash when cursor goes to end of file
-rw-r--r--jet2.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/jet2.cpp b/jet2.cpp
index 9bfa52c..9fb4027 100644
--- a/jet2.cpp
+++ b/jet2.cpp
@@ -87,6 +87,8 @@ int main(int argc, char *argv[]) {
if (cursor_y < window_height - 1) {
cursor_x = 0;
cursor_y++;
+ } else {
+ break;
}
} else {
cursor_x++;