[Ttssh2-commit] [5739] インストーラから Cygwin を探そうとしてエラーになる問題を修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2014年 12月 25日 (木) 22:56:54 JST


Revision: 5739
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5739
Author:   maya
Date:     2014-12-25 22:56:50 +0900 (Thu, 25 Dec 2014)
Log Message:
-----------
インストーラから Cygwin を探そうとしてエラーになる問題を修正
  https://sourceforge.jp/ticket/browse.php?group_id=1412&tid=34725
  Inno Setup から FindCygwinPath に渡した CygwinDirectory が空文字列だと NULL になるため

Modified Paths:
--------------
    trunk/installer/cygtool/cygtool.c

-------------- next part --------------
Modified: trunk/installer/cygtool/cygtool.c
===================================================================
--- trunk/installer/cygtool/cygtool.c	2014-12-11 16:18:30 UTC (rev 5738)
+++ trunk/installer/cygtool/cygtool.c	2014-12-25 13:56:50 UTC (rev 5739)
@@ -10,6 +10,11 @@
 	char file[MAX_PATH], *filename;
 	char c;
 
+	/* zero-length string from Inno Setup is NULL */
+	if (CygwinDirectory == NULL) {
+		goto search_path;
+	}
+
 	if (strlen(CygwinDirectory) > 0) {
 		if (SearchPath(CygwinDirectory, "bin\\cygwin1", ".dll", sizeof(file), file, &filename) > 0) {
 #ifdef EXE
@@ -19,6 +24,7 @@
 		}
 	}
 
+search_path:;
 	if (SearchPath(NULL, "cygwin1", ".dll", sizeof(file), file, &filename) > 0) {
 #ifdef EXE
 		printf("  %s from PATH\n", file);



Ttssh2-commit メーリングリストの案内
Back to archive index