diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index 0f5a56d1d1..3573536451 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -427,19 +427,19 @@ namespace BizHawk.Client.Common return Branches.SingleOrDefault(b => b.UniqueIdentifier == id); } - public int BranchHashByIndex(int index) + public Guid BranchGuidByIndex(int index) { if (index >= Branches.Count) { - return -1; + return Guid.Empty; } - return Branches[index].UniqueIdentifier.GetHashCode(); + return Branches[index].UniqueIdentifier; } - public int BranchIndexByHash(int hash) + public int BranchIndexByHash(Guid uuid) { - TasBranch branch = Branches.SingleOrDefault(b => b.UniqueIdentifier.GetHashCode() == hash); + TasBranch branch = Branches.SingleOrDefault(b => b.UniqueIdentifier == uuid); if (branch == null) { return -1; diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index cf5398c62e..949bbe3942 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -655,9 +655,9 @@ namespace BizHawk.Client.EmuHawk { if (e.NewCell != null && e.NewCell.IsDataCell && e.OldCell.RowIndex.Value < Movie.BranchCount) { - int currentHash = Movie.BranchHashByIndex(Movie.CurrentBranch); + var guid = Movie.BranchGuidByIndex(Movie.CurrentBranch); Movie.SwapBranches(e.OldCell.RowIndex.Value, e.NewCell.RowIndex.Value); - int newIndex = Movie.BranchIndexByHash(currentHash); + int newIndex = Movie.BranchIndexByHash(guid); Movie.CurrentBranch = newIndex; Select(newIndex, true); }