Revision: 8765 https://osdn.net/projects/ttssh2/scm/svn/commits/8765 Author: zmatsuo Date: 2020-05-06 23:51:43 +0900 (Wed, 06 May 2020) Log Message: ----------- バッファ外アクセスでクラッシュする場合があったので修正 Modified Paths: -------------- trunk/teraterm/teraterm/buffer.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/buffer.c =================================================================== --- trunk/teraterm/teraterm/buffer.c 2020-05-06 14:51:29 UTC (rev 8764) +++ trunk/teraterm/teraterm/buffer.c 2020-05-06 14:51:43 UTC (rev 8765) @@ -2472,11 +2472,16 @@ // 1\x82\xE3\x82\xEB\x82̃Z\x83\x8B\x82\xAAURL? if (x == NumOfColumns - 1) { - // \x88\xEA\x94ԉE - if ((CodeLineW[x].attr & AttrLineContinued) != 0) { - const LONG TmpPtr = GetLinePtr(PageStart + cur_y + 1); - if ((CodeLineW[TmpPtr + NumOfColumns - 1].attr & AttrURL) != 0) { - next = TRUE; + // \x8C\xBB\x8D\xDDx\x82\xAA\x88\xEA\x94ԉE? + if ((cur_y + 1) < NumOfLines) { + if ((CodeLineW[x].attr & AttrLineContinued) != 0) { + if ((cur_y + 1) == 24) { + int a = 0; + } + const LONG TmpPtr = GetLinePtr(PageStart + cur_y + 1); + if ((CodeLineW[TmpPtr + NumOfColumns - 1].attr & AttrURL) != 0) { + next = TRUE; + } } } } @@ -2491,7 +2496,7 @@ if (isURLchar(u32)) { // URL\x82ɂ͂\xB3\x82܂\xEA\x82Ă\xA2\x82āAURL\x82ɂȂ肦\x82\xE9\x83L\x83\x83\x83\x89\x83N\x83^ int ptr = GetLinePtr(PageStart + cur_y) + cur_x; - CodeLineW[ptr].attr |= AttrURL; + CodeBuffW[ptr].attr |= AttrURL; return; } // 1line\x8C\x9F\x8D\xB8