From 9c1dcd7eaa786f6f05602a539c39e47516a86d9c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 26 Jun 2001 00:20:58 +0000 Subject: When ANDing two bools, don't use a bitwise AND. 2001-06-25 Jeffrey Stedfast * e-sexp.c (term_eval_and): When ANDing two bools, don't use a bitwise AND. svn path=/trunk/; revision=10499 --- e-util/ChangeLog | 5 +++++ e-util/e-sexp.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index ab7208ef05..bf42704386 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2001-06-25 Jeffrey Stedfast + + * e-sexp.c (term_eval_and): When ANDing two bools, don't use a + bitwise AND. + 2001-06-18 Dan Winship * Makefile.am: Split e-db3-utils and e-dbhash off into libedb3util diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c index 83a9056e5e..e8b100808f 100644 --- a/e-util/e-sexp.c +++ b/e-util/e-sexp.c @@ -251,7 +251,7 @@ term_eval_and(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) e_sexp_result_free(f, r1); g_hash_table_destroy(ht); e_sexp_fatal_error(f, "Invalid types in AND"); - } else if ( r1->type == ESEXP_RES_ARRAY_PTR ) { + } else if (r1->type == ESEXP_RES_ARRAY_PTR) { char **a1; int l1, j; @@ -262,8 +262,8 @@ term_eval_and(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) n = (int)g_hash_table_lookup(ht, a1[j]); g_hash_table_insert(ht, a1[j], (void *)n+1); } - } else if ( r1->type == ESEXP_RES_BOOL ) { - bool &= r1->value.bool; + } else if (r1->type == ESEXP_RES_BOOL) { + bool = bool && r1->value.bool; } e_sexp_result_free(f, r1); } -- cgit