1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-11 14:49:23 +02:00

* bug 85 really fixed

This commit is contained in:
mateuszb 2009-10-04 12:55:56 +00:00
parent 1ac3481579
commit 0fabf5f31d

View File

@ -186,7 +186,7 @@ SDL_Surface * BitmapHandler::loadBitmap(std::string fname, bool setKey)
}
if(e->offset<0)
{
fname.replace(fname.find_first_of('.'),fname.find_first_of('.')+4,".BMP");
fname.replace(fname.find_last_of('.'),fname.find_last_of('.')+4,".BMP");
fname = DATA_DIR "/Data/" + fname;
FILE * f = fopen(fname.c_str(),"r");
if(f)
@ -197,7 +197,7 @@ SDL_Surface * BitmapHandler::loadBitmap(std::string fname, bool setKey)
else //file .bmp not present, check .pcx
{
char sign[3];
fname.replace(fname.find_first_of('.'),fname.find_first_of('.')+4,".PCX");
fname.replace(fname.find_last_of('.'),fname.find_last_of('.')+4,".PCX");
f = fopen(fname.c_str(),"r");
if(!f)
{