Skip to content

Commit

Permalink
Fix TAS movie crash
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneN64 committed Aug 17, 2024
1 parent 38859de commit acdb6b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/core/mmio/PIF/MupenMovie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bool MupenMovie::Load(const fs::path &path) {
return false;
}

memcpy(&loadedTasMovieHeader, loadedTasMovie.data(), loadedTasMovie.size());
memcpy(&loadedTasMovieHeader, loadedTasMovie.data(), sizeof(TASMovieHeader));

if (loadedTasMovieHeader.signature[0] != 0x4D || loadedTasMovieHeader.signature[1] != 0x36 || loadedTasMovieHeader.signature[2] != 0x34 || loadedTasMovieHeader.signature[3] != 0x1A) {
Util::error("Failed to load movie: incorrect signature. Are you sure this is a valid movie?");
Expand Down
4 changes: 2 additions & 2 deletions src/utils/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

namespace Util {
enum LogLevel : u8 {
Trace, Debug, Info, Warn, Error, Always
Trace, Debug, Warn, Info, Error, Always
};

#ifndef NDEBUG
static constexpr auto globalLogLevel = Debug;
#else
static constexpr auto globalLogLevel = Error;
static constexpr auto globalLogLevel = Info;
#endif

template <LogLevel messageType = Info, typename ...Args>
Expand Down

0 comments on commit acdb6b2

Please sign in to comment.