From d3555f10dd56055c0a94b2d56ecd4b58ecb9f47a Mon Sep 17 00:00:00 2001 From: ritsuka Date: Sat, 16 May 2015 07:18:22 +0000 Subject: [PATCH] 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 --- libhb/param.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0