projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2064a07
)
parse: check before truncating strings
author
Luis de Bethencourt
<luis.bg@samsung.com>
Fri, 27 Mar 2015 17:16:03 +0000
(17:16 +0000)
committer
Luis de Bethencourt
<luis.bg@samsung.com>
Fri, 27 Mar 2015 17:16:07 +0000
(17:16 +0000)
Don't truncate the last character of a string if it isn't necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=688625
gst/parse/grammar.y
patch
|
blob
|
history
diff --git
a/gst/parse/grammar.y
b/gst/parse/grammar.y
index
53ee15b
..
f75d9bf
100644
(file)
--- a/
gst/parse/grammar.y
+++ b/
gst/parse/grammar.y
@@
-390,7
+390,8
@@
static void gst_parse_element_set (gchar *value, GstElement *element, graph_t *g
}
pos++;
while (g_ascii_isspace (*pos)) pos++;
- if (*pos == '"') {
+ /* truncate a string if it is delimited with double quotes */
+ if (*pos == '"' && pos[strlen (pos) - 1] == '"') {
pos++;
pos[strlen (pos) - 1] = '\0';
}