diff --git a/.gitignore b/.gitignore index 43612f5..00c70e0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,11 @@ # VS rubbish. Debug/ Release/ -tmx2gba.opensdf -tmx2gba.sdf -tmx2gba.v12.suo +*.opensdf +*.sdf +*.v12.suo +*.vcxproj.user + +# Some files I used for testing. +*.tmx +*.raw diff --git a/src/tmx2gba.cpp b/src/tmx2gba.cpp index 054553a..1d66ee1 100644 --- a/src/tmx2gba.cpp +++ b/src/tmx2gba.cpp @@ -278,7 +278,7 @@ int main ( int argc, char** argv ) vucCharDat.reserve ( info.width * info.height ); for ( size_t i = 0; i < size_t(info.width * info.height * 2); ++i ) { - uint16_t usTile = std::max ( (*pRead++) + iOffset, 0 ); + uint16_t usTile = std::max ( (*pRead++) + (uint16_t)iOffset, 0 ); bool bFlipH = ( 0x8000 & *pRead ) ? true : false; bool bFlipV = ( 0x4000 & *pRead++ ) ? true : false;