Commit 7247525f authored by Simon Morlat's avatar Simon Morlat
Browse files

fix crash on windows due to incorrect usage of MultiByteToWideChar()

parent db0db1b2
...@@ -618,7 +618,7 @@ static int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) { ...@@ -618,7 +618,7 @@ static int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) {
#elif defined(_WIN32) #elif defined(_WIN32)
int ret; int ret;
wchar_t db_file_utf16[MAX_PATH_SIZE]; wchar_t db_file_utf16[MAX_PATH_SIZE];
ret = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, db_file, MAX_PATH_SIZE, db_file_utf16, MAX_PATH_SIZE); ret = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, db_file, -1, db_file_utf16, MAX_PATH_SIZE);
if(ret == 0) db_file_utf16[0] = '\0'; if(ret == 0) db_file_utf16[0] = '\0';
return sqlite3_open16(db_file_utf16, db); return sqlite3_open16(db_file_utf16, db);
#else #else
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment