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
d139be2b
Commit
d139be2b
authored
Apr 05, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: use config_StringEscape.
parent
bca37187
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
33 deletions
+2
-33
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+2
-33
No files found.
modules/misc/lua/vlc.c
View file @
d139be2b
...
...
@@ -582,37 +582,6 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
return
i_count
;
}
static
char
*
escape
(
const
char
*
psz
)
{
if
(
!
psz
)
return
NULL
;
/* Count the number of ' and \ in the string */
const
char
*
it
=
psz
;
int
i_esc
=
0
;
while
(
*
it
!=
'\0'
)
{
if
(
*
it
==
'\''
||
*
it
==
'\\'
)
i_esc
++
;
it
++
;
}
if
(
i_esc
==
0
)
return
strdup
(
psz
);
char
*
psz_esc
=
malloc
(
strlen
(
psz
)
+
i_esc
+
1
);
char
*
it2
=
psz_esc
;
it
=
psz
;
while
(
*
it
!=
'\0'
)
{
if
(
*
it
==
'\''
||
*
it
==
'\\'
)
*
it2
++
=
'\\'
;
*
it2
++
=
*
it
++
;
}
*
it2
=
'\0'
;
return
psz_esc
;
}
static
int
vlc_sd_probe_Open
(
vlc_object_t
*
obj
)
{
vlc_probe_t
*
probe
=
(
vlc_probe_t
*
)
obj
;
...
...
@@ -697,8 +666,8 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
}
}
char
*
psz_file_esc
=
e
scape
(
*
ppsz_file
);
char
*
psz_longname_esc
=
e
scape
(
psz_longname
);
char
*
psz_file_esc
=
config_StringE
scape
(
*
ppsz_file
);
char
*
psz_longname_esc
=
config_StringE
scape
(
psz_longname
);
if
(
asprintf
(
&
psz_name
,
"lua{sd='%s',longname='%s'}"
,
psz_file_esc
,
psz_longname_esc
)
<
0
)
{
...
...
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