Skip to content

Commit

Permalink
Respect luajit prefixes for file sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neloreck committed Jan 25, 2025
1 parent 83d8836 commit feb1333
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Externals/tracy/public/tracy/TracyLua.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,11 @@ static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )

static inline void LuaShortenSrc( char* dst, const char* src )
{
size_t l = std::min( (size_t)255, strlen( src ) );
memcpy( dst, src, l );
// OpenXray - remove '@' prefix from luaJIT to allow directly working with file source with tracy application.
const char* src_trimmed = src && *src == '@' ? src + 1 : src;

size_t l = std::min( (size_t)255, strlen( src_trimmed ) );
memcpy( dst, src_trimmed, l );
dst[l] = 0;
}

Expand Down

0 comments on commit feb1333

Please sign in to comment.