[Xapian-tickets] [Xapian] #802: Omegascript setrelevant should set minargs to be 1 instead of 0
Xapian
nobody at xapian.org
Tue Mar 31 04:07:03 BST 2020
#802: Omegascript setrelevant should set minargs to be 1 instead of 0
--------------------------+-------------------------------
Reporter: Gaurav Arora | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
--------------------------+-------------------------------
Description changed by Gaurav Arora:
Old description:
> setrelevant set the minargs to be 0
> ```
> T(setrelevant, 0, 1, N, Q), // set rset
>
> ```
>
> But assumes it has one argument
> ```
> case CMD_setrelevant: {
> string::size_type i = 0, j;
> while (true) {
> j = args[0].find_first_not_of("0123456789", i);
>
> ```
>
> It gets a segmentation fault when we add `$setrelevant` to the template
> instead of throwing an error message about min-argument.
>
> Its an easy fix so probably can be directly done in repo instead of the
> pull request. Happy to open a pull request if it would be helpful.
New description:
setrelevant set the minargs to be 0
{{{
T(setrelevant, 0, 1, N, Q), // set rset
}}}
But assumes it has one argument
{{{
case CMD_setrelevant: {
string::size_type i = 0, j;
while (true) {
j = args[0].find_first_not_of("0123456789", i);
}}}
It gets a segmentation fault when we add `$setrelevant` to the template
instead of throwing an error message about min-argument.
Its an easy fix so probably can be directly done in repo instead of the
pull request. Happy to open a pull request if it would be helpful.
--
--
Ticket URL: <https://trac.xapian.org/ticket/802#comment:1>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list