From: Jonas Fonseca Date: Mon, 29 May 2006 21:29:38 +0000 (+0200) Subject: Fix segfault where current_view would become >= sizeof(display) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8d741c0664539caf54cb9004151bf8f72517df06;p=tig.git Fix segfault where current_view would become >= sizeof(display) Hard code current_view indexes for split screen setup. Reported-by: Dennis (dst_) on #git --- diff --git a/tig.c b/tig.c index e7deb2e..c323cf8 100644 --- a/tig.c +++ b/tig.c @@ -1411,9 +1411,9 @@ open_view(struct view *prev, enum request request, enum open_flags flags) } if (split) { - display[current_view + 1] = view; + display[1] = view; if (!backgrounded) - current_view++; + current_view = 1; } else { /* Maximize the current view. */ memset(display, 0, sizeof(display));