From 507fa7e2c23623dcbecf20a392ee025002c83866 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 27 Jul 2011 20:59:44 +0300 Subject: options: indicate ambiguous option parameters explicitly Command line options like "-foo xyz" are ambiguous: "xyz" may be a parameter to the option "foo" or an unrelated argument. Instead of relying on the struct m_config mode field (commandline/file) pass parameters to specify ambiguous mode explicitly. Meant for "--foo" options which are never ambiguous on command line either. --- m_struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm_struct.c') diff --git a/m_struct.c b/m_struct.c index 7813340e42..ca7c967ff2 100644 --- a/m_struct.c +++ b/m_struct.c @@ -77,7 +77,7 @@ m_struct_set(const m_struct_t* st, void* obj, const char* field, const char* par return 0; } - if(f->type->parse(f,field,param,M_ST_MB_P(obj,f->p),M_CONFIG_FILE) < 0) { + if(f->type->parse(f, field, param, false, M_ST_MB_P(obj,f->p)) < 0) { mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Struct %s, field %s parsing error: %s\n", st->name,field,param); return 0; -- cgit v1.2.3