Skip to content

Commit

Permalink
Merge pull request #3368 from dilyanpalauzov/32-sieve_once_optional_r…
Browse files Browse the repository at this point in the history
…eversed

3.2 - Sieve "include": :once and :optional flags in bytecode were being parsed in reverse
  • Loading branch information
elliefm committed Sep 4, 2024
2 parents b0cf2dc + 07b5b68 commit 994fcc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sieve/bytecode.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ enum bytecode_tags {
};

#define INC_LOCATION_MASK 0x3F
#define INC_OPTIONAL_MASK 0x40
#define INC_ONCE_MASK 0x80
#define INC_ONCE_MASK 0x40
#define INC_OPTIONAL_MASK 0x80

#define SNOOZE_WDAYS_MASK 0x7F
#define SNOOZE_IS_ID_MASK 0x80
Expand Down
4 changes: 2 additions & 2 deletions sieve/sieved.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@ static void dump2(bytecode_input_t *d, int bc_len)

case B_INCLUDE:
printf("INCLUDE LOCATION(%s) ONCE(%d) OPTIONAL(%d)",
(cmd.u.inc.location = B_PERSONAL) ? "Personal" : "Global",
cmd.u.inc.once, cmd.u.inc.optional);
(cmd.u.inc.location == B_PERSONAL) ? "Personal" : "Global",
!!cmd.u.inc.once, !!cmd.u.inc.optional);
print_string("\n\tSCRIPT", cmd.u.inc.script);
break;

Expand Down

0 comments on commit 994fcc3

Please sign in to comment.