summaryrefslogtreecommitdiffstats
path: root/sys/modules/splash
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1999-01-13 09:59:30 +0000
committeryokota <yokota@FreeBSD.org>1999-01-13 09:59:30 +0000
commit26948ef460d032d3344543f599eb25305482e2a8 (patch)
tree9032ad4d2896cb0874e91f4d8bfbcdc362fb4b3a /sys/modules/splash
parent90eb4d8a343aadab9e0a5a214288c06c32b2699e (diff)
downloadFreeBSD-src-26948ef460d032d3344543f599eb25305482e2a8.zip
FreeBSD-src-26948ef460d032d3344543f599eb25305482e2a8.tar.gz
Calculate the number of bitmap colors in the correct way.
The bug found by: Kevin Street <street@iname.com>
Diffstat (limited to 'sys/modules/splash')
-rw-r--r--sys/modules/splash/bmp/splash_bmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/modules/splash/bmp/splash_bmp.c b/sys/modules/splash/bmp/splash_bmp.c
index bfb5916..03192c6 100644
--- a/sys/modules/splash/bmp/splash_bmp.c
+++ b/sys/modules/splash/bmp/splash_bmp.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: splash_bmp.c,v 1.1 1999/01/11 03:34:56 yokota Exp $
+ * $Id: splash_bmp.c,v 1.2 1999/01/11 17:32:22 yokota Exp $
*/
#include <sys/param.h>
@@ -444,7 +444,7 @@ bmp_Init(const char *data, int swidth, int sheight, int sdepth)
bmp_info.ncols = (bmf->bmfi.bmiHeader.biClrUsed);
bzero(bmp_info.palette,sizeof(bmp_info.palette));
if (bmp_info.ncols == 0) { /* uses all of them */
- bmp_info.ncols = 2 << bmf->bmfi.bmiHeader.biBitCount;
+ bmp_info.ncols = 1 << bmf->bmfi.bmiHeader.biBitCount;
}
if ((bmp_info.height > bmp_info.sheight) ||
(bmp_info.width > bmp_info.swidth) ||
OpenPOWER on IntegriCloud