From effca90834223bd1d9542cd4f1c6fbcc6e4b3d04 Mon Sep 17 00:00:00 2001 From: Todor Tomov Date: Thu, 24 Jun 2010 11:02:27 +0300 Subject: main.c: fix spaces check in parse_pad() Check for spaces before colon also when entity is numeric. Signed-off-by: Todor Tomov --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 96b7ca1..62277b0 100644 --- a/main.c +++ b/main.c @@ -61,13 +61,14 @@ static struct media_entity_pad *parse_pad(struct media_device *media, const char if (entity == NULL) return NULL; - for (++end; isspace(*end); ++end); + ++end; } else { entity_id = strtoul(p, &end, 10); entity = media_get_entity_by_id(media, entity_id); if (entity == NULL) return NULL; } + for (; isspace(*end); ++end); if (*end != ':') return NULL; -- cgit v1.2.3