Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
346168e0
Commit
346168e0
authored
May 01, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Save one malloc()
- Return NULL in case of error
parent
6eba55d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/misc/unicode.c
src/misc/unicode.c
+5
-5
No files found.
src/misc/unicode.c
View file @
346168e0
...
...
@@ -140,18 +140,18 @@ static char *MB2MB( const char *string, UINT fromCP, UINT toCP )
int
len
;
len
=
MultiByteToWideChar
(
fromCP
,
0
,
string
,
-
1
,
NULL
,
0
);
assert
(
len
>
0
);
wide
=
(
wchar_t
*
)
malloc
(
len
*
sizeof
(
wchar_t
));
if
(
wide
==
NULL
)
if
(
len
==
0
);
return
NULL
;
wchar_t
wide
[
len
];
MultiByteToWideChar
(
fromCP
,
0
,
string
,
-
1
,
wide
,
len
);
len
=
WideCharToMultiByte
(
toCP
,
0
,
wide
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
assert
(
len
>
0
);
if
(
len
==
0
)
return
NULL
;
out
=
malloc
(
len
);
WideCharToMultiByte
(
toCP
,
0
,
wide
,
-
1
,
out
,
len
,
NULL
,
NULL
);
free
(
wide
);
return
out
;
}
#endif
...
...
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