Skip to content

Commit

Permalink
Fix use of #stop in a lesskey file.
Browse files Browse the repository at this point in the history
This was probably broken in 09377f7.
Related to gwsw#551.
  • Loading branch information
gwsw committed Jul 31, 2024
1 parent 5854746 commit 2526c72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,10 @@ static int cmd_search(constant char *cmd, constant char *table, constant char *e
/*
* A_END_LIST is a special marker that tells
* us to abort the cmd search.
* Negative action means accept this action
* without searching any more cmd tables.
*/
return (A_UINVALID);
return -a;
}
while (*p++ != '\0')
continue;
Expand Down Expand Up @@ -753,8 +755,10 @@ static int cmd_decode(struct tablelist *tlist, constant char *cmd, constant char
taction = A_INVALID;
if (taction != A_INVALID)
{
action = taction;
*sp = tsp;
if (taction < 0)
return (-taction);
action = taction;
}
}
return (action);
Expand Down

0 comments on commit 2526c72

Please sign in to comment.