From a21b58ebc7e22e20ef944f380c7a82b41d0d8a9a Mon Sep 17 00:00:00 2001 From: Martin Nilsson <nilsson@opera.com> Date: Sun, 9 Jun 2013 19:15:28 +0200 Subject: [PATCH] Mask the flags that are OR:ed, and split the expression in two. --- src/stralloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stralloc.c b/src/stralloc.c index 6b43c7e7d1..d24e5b1314 100644 --- a/src/stralloc.c +++ b/src/stralloc.c @@ -2063,8 +2063,8 @@ PMOD_EXPORT void set_flags_for_add( struct pike_string *ret, else ret->flags &= ~STRING_CONTENT_CHECKED; - ret->flags = (ret->flags & ~(STRING_IS_LOWERCASE | STRING_IS_UPPERCASE)) | - (aflags & b->flags); + ret->flags &= ~(STRING_IS_LOWERCASE | STRING_IS_UPPERCASE); + ret->flags |= (aflags & b->flags & (STRING_IS_LOWERCASE | STRING_IS_UPPERCASE)); } PMOD_EXPORT void update_flags_for_add( struct pike_string *a, struct pike_string *b) -- GitLab