• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision10295 (tree)
Time2022-10-04 22:55:02
Authorzmatsuo

Log Message

バッファの先頭で結合文字が送られてくるとクラッシュする問題を修正

ticket #45763

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/buffer.c (revision 10294)
+++ trunk/teraterm/teraterm/buffer.c (revision 10295)
@@ -2861,7 +2861,13 @@
28612861 // 1つ前の文字が1セル
28622862 StrChangeCount = 1;
28632863 }
2864- StrChangeStart = CursorX - StrChangeCount;
2864+ if (CursorX == 0) {
2865+ // カーソルが左端の時
2866+ StrChangeStart = 0;
2867+ }
2868+ else {
2869+ StrChangeStart = CursorX - StrChangeCount;
2870+ }
28652871 }
28662872 }
28672873 }
@@ -3438,6 +3444,7 @@
34383444 {
34393445 int X, Y;
34403446
3447+ assert(StrChangeStart >= 0);
34413448 if (StrChangeCount==0) {
34423449 return;
34433450 }
Show on old repository browser