Skip to content

Commit

Permalink
Merge pull request #185 from rnpnr/thread_frame
Browse files Browse the repository at this point in the history
properly skip leading spaces in Frame string
  • Loading branch information
nakst authored Jan 13, 2025
2 parents ab47ef8 + 6f3bd45 commit 8e75d18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,9 @@ void ThreadWindowUpdate(const char *, UIElement *_table) {
memcpy(thread.name, position, end - position);
thread.name[end - position] = 0;

position = strchr(end + 1, '0');
position = end + 1;
while (*position == ' ') position++;

end = strchr(position, '\n');
if (end - position >= (ptrdiff_t) sizeof(thread.frame))
end = position + sizeof(thread.frame) - 1;
Expand Down

0 comments on commit 8e75d18

Please sign in to comment.