From 16ada0fa3bed6fc08d693278a210ca16c867edb0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 Feb 2002 10:50:09 +0000 Subject: [PATCH] Fix to BMP loader. --- src/osgPlugins/bmp/Makefile | 8 ++++---- src/osgPlugins/bmp/ReaderWriterBMP.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osgPlugins/bmp/Makefile b/src/osgPlugins/bmp/Makefile index c28ab39cc..bdff3a930 100644 --- a/src/osgPlugins/bmp/Makefile +++ b/src/osgPlugins/bmp/Makefile @@ -6,18 +6,18 @@ C++FILES = \ TARGET_BASENAME = osgdb_bmp -TARGET_LIB_FILES = lib$(TARGET_BASENAME).$(DL_EXT) - +LOADABLE = $(OSGHOME)/lib/osgPlugins/$(TARGET_BASENAME).$(DL_EXT) LIB= -LODABLE = $(OSGHOME)/lib/osgPlugins/$(TARGET_BASENAME).$(DL_EXT) TARGET_LOADER_FILES = osgPlugins/$(TARGET_BASENAME).$(DL_EXT) LIBS = $(GL_LIBS) -losg -losgDB -MACOSXLIBS = -L$(OSGOME)/lib -losg -losgDB -lstdc++ +MACOSXLIBS = -L$(OSGHOME)/lib -losg -losgUtil -losgDB -ldl -lstdc++ C++FLAGS += -I. -I$(OSGHOME)/include LDFLAGS += -L$(OSGHOME)/lib include $(OSGHOME)/Make/makerules + + diff --git a/src/osgPlugins/bmp/ReaderWriterBMP.cpp b/src/osgPlugins/bmp/ReaderWriterBMP.cpp index 988524838..ca215bcc7 100644 --- a/src/osgPlugins/bmp/ReaderWriterBMP.cpp +++ b/src/osgPlugins/bmp/ReaderWriterBMP.cpp @@ -188,7 +188,7 @@ int *numComponents_ret) inf.Colorbits=cbits; inf.ColorUsed=pow(2.0,inf.Colorbits); // infer the colours } - long size = hd.siz[1]*65536+hd.siz[0]; + long size = (unsigned short)hd.siz[1]*65536+(unsigned short)hd.siz[0]; int ncpal=4; // default number of colours per palette entry size -= sizeof(bmpheader)+infsize; if (inf.ImageSize