Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0074c723
Commit
0074c723
authored
Mar 11, 2010
by
Fabio Ritrovato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: don't use empty strings for metas (close #3403)
parent
b5014d72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
modules/misc/lua/libs/sd.c
modules/misc/lua/libs/sd.c
+2
-2
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+2
-1
No files found.
modules/misc/lua/libs/sd.c
View file @
0074c723
...
...
@@ -122,7 +122,7 @@ static int vlclua_sd_add_node( lua_State *L )
-
1
,
ITEM_TYPE_NODE
);
free
(
name
);
lua_getfield
(
L
,
-
1
,
"arturl"
);
if
(
lua_isstring
(
L
,
-
1
)
)
if
(
lua_isstring
(
L
,
-
1
)
&&
strcmp
(
lua_tostring
(
L
,
-
1
),
""
)
)
{
char
*
psz_value
=
strdup
(
lua_tostring
(
L
,
-
1
)
);
EnsureUTF8
(
psz_value
);
...
...
@@ -291,7 +291,7 @@ static int vlclua_node_add_node( lua_State *L )
name
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_NODE
);
free
(
name
);
lua_getfield
(
L
,
-
1
,
"arturl"
);
if
(
lua_isstring
(
L
,
-
1
)
&&
strcmp
(
lua_tostring
(
L
,
-
1
),
""
)
)
if
(
lua_isstring
(
L
,
-
1
)
)
{
char
*
psz_value
=
strdup
(
lua_tostring
(
L
,
-
1
)
);
...
...
modules/misc/lua/vlc.c
View file @
0074c723
...
...
@@ -320,7 +320,8 @@ void __vlclua_read_meta_data( vlc_object_t *p_this, lua_State *L,
{
#define TRY_META( a, b ) \
lua_getfield( L, -1, a ); \
if( lua_isstring( L, -1 ) ) \
if( lua_isstring( L, -1 ) && \
strcmp( lua_tostring( L, -1 ), "" ) ) \
{ \
char *psz_value = strdup( lua_tostring( L, -1 ) ); \
EnsureUTF8( psz_value ); \
...
...
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