Tera Termの個人的な作業用リポジトリ
Revisión | a0d074e85642b7f90dde677e69e8a00f2caaa5db (tree) |
---|---|
Tiempo | 2023-10-16 23:53:44 |
Autor | zmatsuo <zmatsuo@user...> |
Commiter | zmatsuo |
マクロコマンド strjoin で連結文字列を設定する変数を誤っていたので修正
- 連結元の最後の変数に連結文字列を設定していた
ticket #48858
git-svn-id: svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk@11009 f5f01b69-1e22-0410-acbf-894ab4bd6246
@@ -31,6 +31,25 @@ | ||
31 | 31 | |
32 | 32 | <h2 id="teraterm">Tera Term</h2> |
33 | 33 | |
34 | +<h3 id="teraterm_5.1">YYYY.MM.DD (Ver 5.1, not yet released)</h3> | |
35 | +<ul class="history"> | |
36 | + <!-- li>Changes | |
37 | + <ul> | |
38 | + </ul> | |
39 | + </li --> | |
40 | + | |
41 | + <li>Bug fixes | |
42 | + <ul> | |
43 | + <li>MACRO: <a href="../macro/command/strjoin.html">strjoin</a> command set concatenated string to the wrong variable.</li> | |
44 | + </ul> | |
45 | + </li> | |
46 | + | |
47 | + <!-- li>Misc | |
48 | + <ul> | |
49 | + </ul> | |
50 | + </li --> | |
51 | +</ul> | |
52 | + | |
34 | 53 | <h3 id="teraterm_5.0">2023.10.15 (Ver 5.0)</h3> |
35 | 54 | <ul class="history"> |
36 | 55 | <li>Changes |
@@ -31,6 +31,25 @@ | ||
31 | 31 | |
32 | 32 | <h2 id="teraterm">Tera Term</h2> |
33 | 33 | |
34 | +<h3 id="teraterm_5.1">YYYY.MM.DD (Ver 5.1, not yet released)</h3> | |
35 | +<ul class="history"> | |
36 | + <!-- li>変更 | |
37 | + <ul> | |
38 | + </ul> | |
39 | + </li --> | |
40 | + | |
41 | + <li>バグ修正 | |
42 | + <ul> | |
43 | + <li><a href="../macro/command/strjoin.html">strjoin</a> マクロコマンドで、連結文字列を誤った変数へセットしていた問題を修正した。</li> | |
44 | + </ul> | |
45 | + </li> | |
46 | + | |
47 | + <!-- li>その他 | |
48 | + <ul> | |
49 | + </ul> | |
50 | + </li --> | |
51 | +</ul> | |
52 | + | |
34 | 53 | <h3 id="teraterm_5.0">2023.10.15 (Ver 5.0)</h3> |
35 | 54 | <ul class="history"> |
36 | 55 | <li>変更 |
@@ -5046,12 +5046,12 @@ WORD TTLStrSplit() | ||
5046 | 5046 | #undef MAXVARNUM |
5047 | 5047 | } |
5048 | 5048 | |
5049 | -WORD TTLStrJoin() | |
5049 | +static WORD TTLStrJoin(void) | |
5050 | 5050 | { |
5051 | 5051 | #define MAXVARNUM 9 |
5052 | 5052 | TStrVal delimchars, buf; |
5053 | 5053 | WORD Err; |
5054 | - TVarId VarId; | |
5054 | + TVarId TargetVarId; | |
5055 | 5055 | WORD VarType; |
5056 | 5056 | int maxvar; |
5057 | 5057 | int i; |
@@ -5060,7 +5060,7 @@ WORD TTLStrJoin() | ||
5060 | 5060 | const char *p; |
5061 | 5061 | |
5062 | 5062 | Err = 0; |
5063 | - GetStrVar(&VarId,&Err); | |
5063 | + GetStrVar(&TargetVarId,&Err); | |
5064 | 5064 | GetStrVal(delimchars,&Err); |
5065 | 5065 | // 3rd arg (optional) |
5066 | 5066 | if (CheckParameterGiven()) { |
@@ -5088,7 +5088,7 @@ WORD TTLStrJoin() | ||
5088 | 5088 | return ErrSyntax; |
5089 | 5089 | |
5090 | 5090 | char dest[MaxStrLen]; |
5091 | - strcpy_s(dest, sizeof(dest), StrVarPtr(VarId)); | |
5091 | + strcpy_s(dest, sizeof(dest), StrVarPtr(TargetVarId)); | |
5092 | 5092 | srcptr = dest; |
5093 | 5093 | |
5094 | 5094 | srcptr[0] = '\0'; |
@@ -5097,6 +5097,7 @@ WORD TTLStrJoin() | ||
5097 | 5097 | } |
5098 | 5098 | else { |
5099 | 5099 | for (i = 0 ; i < maxvar ; i++) { |
5100 | + TVarId VarId; | |
5100 | 5101 | _snprintf_s(buf, sizeof(buf), _TRUNCATE, "groupmatchstr%d", i + 1); |
5101 | 5102 | if (CheckVar(buf,&VarType,&VarId)) { |
5102 | 5103 | if (VarType!=TypString) |
@@ -5109,7 +5110,7 @@ WORD TTLStrJoin() | ||
5109 | 5110 | } |
5110 | 5111 | } |
5111 | 5112 | } |
5112 | - SetStrVal(VarId, dest); | |
5113 | + SetStrVal(TargetVarId, dest); | |
5113 | 5114 | |
5114 | 5115 | return Err; |
5115 | 5116 | #undef MAXVARNUM |