Fix bug in pmf

This commit is contained in:
brenosilva
2011-03-31 19:37:55 +00:00
parent b7a926c20a
commit 5e480d85a6

View File

@@ -1209,12 +1209,12 @@ static int msre_op_pmFromFile_param_init(msre_rule *rule, char **error_msg) {
start = processed; start = processed;
else else
start = buf; start = buf;
while ((apr_isspace(*start) != 0) && (*start != '\0')) start++; while ((apr_isspace(*start) != 0) && (*start != '\0')) start++;
if(processed != NULL) if(processed != NULL)
end = processed + strlen(processed); end = processed + strlen(processed);
else else
end = buf + strlen(buf); end = buf + strlen(buf);
//end = buf + strlen(buf);
if (end > start) end--; if (end > start) end--;
while ((end > start) && (apr_isspace(*end) != 0)) end--; while ((end > start) && (apr_isspace(*end) != 0)) end--;
if (end > start) { if (end > start) {
@@ -1224,10 +1224,6 @@ static int msre_op_pmFromFile_param_init(msre_rule *rule, char **error_msg) {
/* Ignore empty lines and comments */ /* Ignore empty lines and comments */
if ((start == end) || (*start == '#')) continue; if ((start == end) || (*start == '#')) continue;
#ifdef DEBUG_CONF
fprintf(stderr, "Adding phrase file pattern: \"%s\"\n", buf);
#endif
acmp_add_pattern(p, start, NULL, NULL, (end - start)); acmp_add_pattern(p, start, NULL, NULL, (end - start));
} }
fn = next; fn = next;