• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Tera Termの個人的な作業用リポジトリ


コミットメタ情報

リビジョン1560ef405ded690d9652a450ff3a724c8618cb95 (tree)
日時2022-09-08 00:21:24
作者zmatsuo <zmatsuo@user...>
コミッターzmatsuo

ログメッセージ

hGetFullPathNameW() で例外が出るケースがあったので修正

git-svn-id: svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk@10252 f5f01b69-1e22-0410-acbf-894ab4bd6246

変更サマリ

差分

--- a/teraterm/common/win32helper.cpp
+++ b/teraterm/common/win32helper.cpp
@@ -116,7 +116,7 @@ DWORD hGetPrivateProfileStringW(const wchar_t *section, const wchar_t *key, cons
116116 for(;;) {
117117 DWORD r = GetPrivateProfileStringW(section, key, def, b, (DWORD)size, ini);
118118 if (r == 0 || b[0] == L'\0') {
119- DWORD error = GetLastError();
119+ error = GetLastError();
120120 free(b);
121121 *str = _wcsdup(L"");
122122 // aswprintf(str, L"%s/%s\n",section, key); // 確認用
@@ -157,7 +157,9 @@ DWORD hGetFullPathNameW(const wchar_t *lpFileName, wchar_t **fullpath, wchar_t *
157157 size_t len = GetFullPathNameW(lpFileName, 0, NULL, NULL); // include L'\0'
158158 if (len == 0) {
159159 *fullpath = NULL;
160- *filepart = NULL;
160+ if (filepart != NULL) {
161+ *filepart = NULL;
162+ }
161163 return GetLastError();
162164 }
163165 wchar_t *path = (wchar_t *)malloc(sizeof(wchar_t) * len);