[Ttssh2-commit] [8439] gccでビルドできるよう修正

scmno****@osdn***** scmno****@osdn*****
2019年 12月 14日 (土) 00:12:31 JST


Revision: 8439
          https://osdn.net/projects/ttssh2/scm/svn/commits/8439
Author:   zmatsuo
Date:     2019-12-14 00:12:30 +0900 (Sat, 14 Dec 2019)
Log Message:
-----------
gccでビルドできるよう修正

- crosses initialization of 'SendMem* sm'

Modified Paths:
--------------
    branches/unicode_buf/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: branches/unicode_buf/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-12-13 15:12:00 UTC (rev 8438)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-12-13 15:12:30 UTC (rev 8439)
@@ -4527,17 +4527,15 @@
 	wchar_t *filename = data.filename;
 	size_t str_len;
 	wchar_t *str_ptr = LoadFileWW(filename, &str_len);
-	if (str_ptr == NULL) {
-		goto finish;
+	if (str_ptr != NULL) {
+		str_len *= sizeof(wchar_t);
+
+		SendMem *sm = SendMemInit(str_ptr, str_len, SendMemTypeTextLF);
+		SendMemInitDialog(sm, hInst, HVTWin, ts.UILanguageFile);
+		SendMemInitDialogCaption(sm, L"send file");			// title
+		SendMemInitDialogFilename(sm, filename);
+		SendMemStart(sm);
 	}
-	str_len *= sizeof(wchar_t);
-
-	SendMem *sm = SendMemInit(str_ptr, str_len, SendMemTypeTextLF);
-	SendMemInitDialog(sm, hInst, HVTWin, ts.UILanguageFile);
-	SendMemInitDialogCaption(sm, L"send file");			// title
-	SendMemInitDialogFilename(sm, filename);
-	SendMemStart(sm);
-finish:
 	free(filename);
 #endif
 }


Ttssh2-commit メーリングリストの案内