From d02583b999840e9456732a4b4a0a7e8745d2e824 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 24 Apr 2003 22:34:10 +0000 Subject: [PATCH] fix stupid segfault when setting integer properties Original commit message from CVS: fix stupid segfault when setting integer properties --- gst/parse/grammar.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y index 2eee7ca97d..1d694318cd 100644 --- a/gst/parse/grammar.y +++ b/gst/parse/grammar.y @@ -267,7 +267,7 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph) break; case G_TYPE_ENUM: { GEnumValue *en; - gchar **endptr = NULL; + gchar *endptr = NULL; GEnumClass *klass = (GEnumClass *) g_type_class_peek (G_PARAM_SPEC_VALUE_TYPE (pspec)); if (klass == NULL) goto error; if (!(en = g_enum_get_value_by_name (klass, pos))) @@ -275,8 +275,8 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph) if (en) { g_value_set_enum (&v, en->value); } else { - gint i = strtol (value, endptr, 0); - if (**endptr == '\0') { + gint i = strtol (value, &endptr, 0); + if (*endptr == '\0') { g_value_set_enum (&v, i); } else { goto error;