From 9cdbd391508fea84ac3904d72d463b9e9ecb78a1 Mon Sep 17 00:00:00 2001 From: Johnny Stenback Date: Tue, 25 May 2010 15:27:29 -0700 Subject: [PATCH] Followup fix for bug 565124. Don't write to bits other than the first bit in a 1-bit sized member. r=dholbert@mozilla.com, r=joe@drew.ca --- modules/libpr0n/src/imgContainer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/libpr0n/src/imgContainer.cpp b/modules/libpr0n/src/imgContainer.cpp index 4f36179fb66..0ded48408bf 100644 --- a/modules/libpr0n/src/imgContainer.cpp +++ b/modules/libpr0n/src/imgContainer.cpp @@ -234,9 +234,9 @@ NS_IMETHODIMP imgContainer::Init(imgIDecoderObserver *aObserver, // Store initialization data mObserver = do_GetWeakReference(aObserver); mSourceDataMimeType.Assign(aMimeType); - mDiscardable = aFlags & INIT_FLAG_DISCARDABLE; - mDecodeOnDraw = aFlags & INIT_FLAG_DECODE_ON_DRAW;; - mMultipart = aFlags & INIT_FLAG_MULTIPART; + mDiscardable = !!(aFlags & INIT_FLAG_DISCARDABLE); + mDecodeOnDraw = !!(aFlags & INIT_FLAG_DECODE_ON_DRAW); + mMultipart = !!(aFlags & INIT_FLAG_MULTIPART); // Statistics if (mDiscardable) {