Revision: 9583 https://osdn.net/projects/ttssh2/scm/svn/commits/9583 Author: zmatsuo Date: 2021-12-07 23:39:10 +0900 (Tue, 07 Dec 2021) Log Message: ----------- INIファイルのLanguage=とKanjiReceive=の組み合わせがおかしいとき異常終了するので修正 - テーブルのサイズを誤っていた Modified Paths: -------------- trunk/teraterm/common/ttlib_charset.cpp -------------- next part -------------- Modified: trunk/teraterm/common/ttlib_charset.cpp =================================================================== --- trunk/teraterm/common/ttlib_charset.cpp 2021-12-06 15:45:41 UTC (rev 9582) +++ trunk/teraterm/common/ttlib_charset.cpp 2021-12-07 14:39:10 UTC (rev 9583) @@ -109,7 +109,7 @@ */ const char *GetKanjiCodeStr(int language, int kanji_code) { - for (int i = 0; i < sizeof(KanjiList); i++) { + for (int i = 0; i < _countof(KanjiList); i++) { if (KanjiList[i].lang == language && KanjiList[i].coding == kanji_code) { return KanjiList[i].KanjiCode; @@ -132,7 +132,7 @@ return IdUTF8; } - for (int i = 0; i < sizeof(KanjiList); i++) { + for (int i = 0; i < _countof(KanjiList); i++) { if (KanjiList[i].lang == language && strcmp(KanjiList[i].KanjiCode, kanji_code_str) == 0) { return KanjiList[i].coding;