From 8560c5b0f7ee17cdf6323af59670a0b8740ad235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 27 Sep 2009 09:17:18 +0000 Subject: [PATCH] Patch by Joshua R. Elsasser: (ticket #4650) * In _InsertGap(), be sure not to set a line's length longer than the space allocated for it. Nice catch, thanks a bunch! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33317 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/BasicTerminalBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/terminal/BasicTerminalBuffer.cpp b/src/apps/terminal/BasicTerminalBuffer.cpp index 6470031c02..41f85fad39 100644 --- a/src/apps/terminal/BasicTerminalBuffer.cpp +++ b/src/apps/terminal/BasicTerminalBuffer.cpp @@ -1352,7 +1352,7 @@ BasicTerminalBuffer::_InsertGap(int32 width) line->cells + fCursor.x, toMove * sizeof(TerminalCell)); } - line->length += width; + line->length = min_c(line->length + width, fWidth); }