Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
78277aed
Commit
78277aed
authored
Oct 01, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplication and do the NULL text before dereferencing (CID 232)
parent
47be9baa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
src/text/unicode.c
src/text/unicode.c
+3
-6
No files found.
src/text/unicode.c
View file @
78277aed
...
...
@@ -99,6 +99,9 @@ static int find_charset (void)
static
char
*
locale_fast
(
const
char
*
string
,
bool
from
)
{
if
(
string
==
NULL
)
return
NULL
;
#if defined (USE_ICONV)
if
(
find_charset
())
return
(
char
*
)
string
;
...
...
@@ -113,9 +116,6 @@ static char *locale_fast (const char *string, bool from)
size_t
outb
=
inb
*
6
+
1
;
char
output
[
outb
],
*
optr
=
output
;
if
(
string
==
NULL
)
return
NULL
;
while
(
vlc_iconv
(
hd
,
&
iptr
,
&
inb
,
&
optr
,
&
outb
)
==
(
size_t
)(
-
1
))
{
*
optr
++
=
'?'
;
...
...
@@ -136,9 +136,6 @@ static char *locale_fast (const char *string, bool from)
char
*
out
;
int
len
;
if
(
string
==
NULL
)
return
NULL
;
len
=
1
+
MultiByteToWideChar
(
from
?
CP_ACP
:
CP_UTF8
,
0
,
string
,
-
1
,
NULL
,
0
);
wchar_t
wide
[
len
];
...
...
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