dougmencken / HeadOverHeels

The free and open source remake of the game “Head over Heels”
GNU General Public License v3.0
33 stars 10 forks source link

compilation error #28

Closed rezso closed 6 years ago

rezso commented 6 years ago

Compiling https://github.com/dougmencken/HeadOverHeels/commit/6d3d54a24ce08ce2ee9501f0f55f98f4870bd4d5 fails:

Isomot.cpp: In member function ‘BITMAP isomot::Isomot::update()’: Isomot.cpp:417:51: error: invalid conversion from ‘const char’ to ‘char’ [-fpermissive] char fromLastSlash = std::strrchr( roomFile.c_str (), '/' );


make[1]: *** [Makefile:1354: headoverheels-Isomot.o] Error 1
dougmencken commented 6 years ago

take this patch

--- a/src/Isomot.cpp
+++ b/src/Isomot.cpp
@@ -414,7 +414,7 @@ BITMAP* Isomot::update()
                 );

                 std::string roomFile = activeRoom->getNameOfFileWithDataAboutRoom() ;
-                char* fromLastSlash = std::strrchr( roomFile.c_str (), '/' );
+                const char* fromLastSlash = std::strrchr( roomFile.c_str (), '/' );
                 if ( fromLastSlash != nilPointer )
                         roomFile = std::string( fromLastSlash + 1 );
dougmencken commented 6 years ago

yet in master https://github.com/dougmencken/HeadOverHeels/commit/efc740cf92cd6ddc29f7f18d36229f97e32e018b#diff-bf76b4fda2e1d9ce0b9ec8f3f60a5fff

rezso commented 6 years ago

I compiled efc740c successfully, thanks.