Skip to content

Commit

Permalink
Fixed instruction profiling crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen committed Oct 28, 2024
1 parent 5ab02cf commit 264dfe7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/scriptProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ game_value callExtensionRedirect(game_state&, game_value_parameter ext, game_val

auto tempData = GProfilerAdapter->enterScope(profiler.callExtScope);

//GProfilerAdapter->setDescription(tempData, msg);
GProfilerAdapter->setName(tempData, ext);
GProfilerAdapter->setDescription(tempData, msg);

auto res = sqf::call_extension(ext,msg);

Expand Down Expand Up @@ -1039,7 +1040,7 @@ namespace intercept::__internal {
private:
std::array<size_t,
#if _WIN64 || __X86_64__
10
9
#else
#ifdef __linux__
8
Expand Down Expand Up @@ -1194,7 +1195,7 @@ class GameInstructionOperator : public game_instruction {
typedef bool(__thiscall *OrigEx)(game_instruction*, game_state&, vm_context&);

if (instructionLevelProfiling) {
auto instructionName = _operators->_name;
auto instructionName = _operators->gsFuncBase::_name;

auto found = descriptions.find(reinterpret_cast<size_t>(instructionName.data()));
if (found == descriptions.end()) {
Expand Down Expand Up @@ -1226,7 +1227,7 @@ class GameInstructionFunction : public game_instruction {
typedef bool(__thiscall *OrigEx)(game_instruction*, game_state&, vm_context&);

if (instructionLevelProfiling) {
auto instructionName = _functions->_name;
auto instructionName = _functions->gsFuncBase::_name;

auto found = descriptions.find(reinterpret_cast<size_t>(instructionName.data()));
if (found == descriptions.end()) {
Expand Down

0 comments on commit 264dfe7

Please sign in to comment.