Here is a GDB script to fix it (tested on GNU/Linux only):
tbreak _ZN3App9initMediaEv
commands
set {char}_ZN3App9msgRadiusEv=0xB8
set {int}(_ZN3App9msgRadiusEv+1)=3
set {char}(_ZN3App9msgRadiusEv+5)=0xC3
end
run
detach
quit
Run it like this, assuming it is saved to msgRadius.gdb and Telegram is /usr/bin/telegram-desktop:
$ gdb -x msgRadius.gdb /usr/bin/telegram-desktop
This replaces the start of App::msgRadius
with
mov $0x3, %eax
retq
In C++, that is return 3
;
Explanation: 0xB8
means mov
a number to %eax
, 3
is the border radius, and 0xC3
is retq
Thanks for not giving me any credit…
telegramdesktop/tdesktop#2235 (comment)