diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 9e4f481b0..3e69dc978 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -17,6 +17,13 @@ target_link_libraries( NostalgiaCore ) +install( + TARGETS + nost-pack + RUNTIME DESTINATION + bin +) + set(CMAKE_INCLUDE_CURRENT_DIR OFF) set(CMAKE_AUTOMOC OFF) diff --git a/src/tools/pack.cpp b/src/tools/pack.cpp index 0724e9db1..cc04f3b85 100644 --- a/src/tools/pack.cpp +++ b/src/tools/pack.cpp @@ -64,7 +64,7 @@ int run(ClArgs args) { auto compact = args.getBool("c"); QMap colors; QImage src(inPath); - const auto imgDataBuffSize = sizeof(Pallete) + src.width() * src.height(); + const auto imgDataBuffSize = sizeof(Pallete) - 1 + src.width() * src.height(); uint8_t imgDataBuff[imgDataBuffSize]; GbaImageData *id = (GbaImageData*) imgDataBuff; int colorId = 0;