From: Alan T. DeKok Date: Thu, 7 Apr 2011 07:44:26 +0000 (+0200) Subject: Don't over-write a fail code with a success code. X-Git-Tag: release_2_1_11~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=991735b62571bb54b03fae55a9f9860c01383caa;p=thirdparty%2Ffreeradius-server.git Don't over-write a fail code with a success code. Closes bug #152 --- diff --git a/src/main/valuepair.c b/src/main/valuepair.c index f8feb4008be..601d2128ddd 100644 --- a/src/main/valuepair.c +++ b/src/main/valuepair.c @@ -521,7 +521,7 @@ int paircompare(REQUEST *req, VALUE_PAIR *request, VALUE_PAIR *check, VALUE_PAIR #ifdef HAVE_REGEX_H case T_OP_REG_EQ: case T_OP_REG_NE: - result = compare; + if (compare != 0) result = -1; break; #endif } /* switch over the operator of the check item */