mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Movie: Fix 83b9fef
regressions
1. Comparing string_views does not behave the same as strncmp in the case where SConfig's game ID is longer than 6 chars. 2. DTMHeader::GetGameID wasn't excluding null bytes for game IDs shorter than 6 chars. 3. == was accidentally used instead of !=.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@ -64,7 +65,10 @@ static_assert(sizeof(ControllerState) == 8, "ControllerState should be 8 bytes")
|
||||
#pragma pack(push, 1)
|
||||
struct DTMHeader
|
||||
{
|
||||
std::string_view GetGameID() const { return {gameID.data(), gameID.size()}; }
|
||||
std::string_view GetGameID() const
|
||||
{
|
||||
return {gameID.data(), strnlen(gameID.data(), gameID.size())};
|
||||
}
|
||||
|
||||
std::array<u8, 4> filetype; // Unique Identifier (always "DTM"0x1A)
|
||||
|
||||
|
Reference in New Issue
Block a user