From: ritsuka Date: Sat, 16 May 2015 07:18:22 +0000 (+0000) Subject: Allow negative number in hb_validate_filter_settings. Fix deinterlace settings valida... X-Git-Tag: 1.0.0~1164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3555f10dd56055c0a94b2d56ecd4b58ecb9f47a;p=handbrake Allow negative number in hb_validate_filter_settings. Fix deinterlace settings validation. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7193 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/param.c b/libhb/param.c index 9263351d2..494badf39 100644 --- a/libhb/param.c +++ b/libhb/param.c @@ -311,8 +311,8 @@ int hb_validate_filter_settings(int filter_id, const char *filter_param) if (filter_param == NULL) return 0; - // Regex matches "number" followed by one or more ":number", where number is uint or ufloat - const char *hb_colon_separated_params_regex = "^((([0-9]+([.,][0-9]+)?)|([.,][0-9]+))((:(([0-9]+([,.][0-9]+)?)|([,.][0-9]+)))+)?)$"; + // Regex matches "number" followed by one or more ":number", where number is int or float + const char *hb_colon_separated_params_regex = "^(((([\\-])?[0-9]+([.,][0-9]+)?)|(([\\-])?[.,][0-9]+))((:((([\\-])?[0-9]+([,.][0-9]+)?)|(([\\-])?[,.][0-9]+)))+)?)$"; const char *regex_pattern = NULL;