Fixed x509_crt_parse_path() bug on Windows platforms
diff --git a/ChangeLog b/ChangeLog
index 12bbaf0..3236632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
    * Fixed X.509 hostname comparison (with non-regular characters)
    * SSL now gracefully handles missing RNG
    * crypt_and_hash app checks MAC before final decryption
+   * Fixed x509_crt_parse_path() bug on Windows platforms
 
 = Version 1.2.10 released 2013-10-07
 Changes
diff --git a/library/x509parse.c b/library/x509parse.c
index 26d655f..0e854a2 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -1915,7 +1915,7 @@
 	p = filename + len;
     filename[len++] = '*';
 
-	w_ret = MultiByteToWideChar( CP_ACP, 0, path, len, szDir, MAX_PATH - 3 );
+	w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir, MAX_PATH - 3 );
 
     hFind = FindFirstFileW( szDir, &file_data );
     if (hFind == INVALID_HANDLE_VALUE)