Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
7247525f
Commit
7247525f
authored
Aug 24, 2015
by
Simon Morlat
Browse files
fix crash on windows due to incorrect usage of MultiByteToWideChar()
parent
db0db1b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
coreapi/message_storage.c
coreapi/message_storage.c
+1
-1
No files found.
coreapi/message_storage.c
View file @
7247525f
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment