diff options
author | yokota <yokota@FreeBSD.org> | 1999-01-13 09:59:30 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-01-13 09:59:30 +0000 |
commit | 26948ef460d032d3344543f599eb25305482e2a8 (patch) | |
tree | 9032ad4d2896cb0874e91f4d8bfbcdc362fb4b3a | |
parent | 90eb4d8a343aadab9e0a5a214288c06c32b2699e (diff) | |
download | FreeBSD-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>
-rw-r--r-- | sys/dev/fb/splash_bmp.c | 4 | ||||
-rw-r--r-- | sys/modules/splash/bmp/splash_bmp.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/fb/splash_bmp.c b/sys/dev/fb/splash_bmp.c index bfb5916..03192c6 100644 --- a/sys/dev/fb/splash_bmp.c +++ b/sys/dev/fb/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) || 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) || |