From 0fadc0b0ae30c97b9c810476f3c96ed5ce25a1f9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 24 Jan 2014 12:55:22 -0800 Subject: [PATCH] Fix bool-vector-count-population bug on MinGW64. * data.c (count_one_bits_word): Fix bug (negated comparison) when BITS_PER_ULL < BITS_PER_BITS_WORD. Fixes: debbugs:16535 --- src/ChangeLog | 6 ++++++ src/data.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6dbaa5cbcf2..e1e9cba7640 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-01-24 Paul Eggert + + Fix bool-vector-count-population bug on MinGW64 (Bug#16535). + * data.c (count_one_bits_word): Fix bug (negated comparison) + when BITS_PER_ULL < BITS_PER_BITS_WORD. + 2014-01-24 Dmitry Antipov * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction): Avoid diff --git a/src/data.c b/src/data.c index 1741f908396..2a64c1bbf82 100644 --- a/src/data.c +++ b/src/data.c @@ -3012,7 +3012,7 @@ count_one_bits_word (bits_word w) { int i = 0, count = 0; while (count += count_one_bits_ll (w), - BITS_PER_BITS_WORD <= (i += BITS_PER_ULL)) + (i += BITS_PER_ULL) < BITS_PER_BITS_WORD) w = shift_right_ull (w); return count; } -- 2.39.2