Skip to content

Commit

Permalink
fixed title suffix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sptls committed Sep 28, 2022
1 parent 05d456d commit 0ab6f65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ void RestoreTitle(HWND hwnd)
{
char title[MAX_TITLE_LEN];
GetWindowTextA(hwnd, title, MAX_TITLE_LEN);
title[strlen(title) - strlen(" (ONTOP") - 1] = '\0';
if(strstr(title, " (ONTOP)") == NULL)
return;
title[strlen(title) - strlen(" (ONTOP)")] = '\0';
SetWindowTextA(hwnd, title);
}

0 comments on commit 0ab6f65

Please sign in to comment.