mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
drw.c: use the same pattern as ellipsis_width to check for infinite recursion
ref. https://git.suckless.org/dmenu/commit/475d8093cb8d29d5756937bfa9e0b3b9e415f632.html
This commit is contained in:
parent
b980b0a359
commit
3b547d5263
@ -1,5 +1,5 @@
|
||||
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this dmenu 5.3 (7be720c,
|
||||
2024-03-19) project has a different take on patching. It uses preprocessor directives to decide
|
||||
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this dmenu 5.3 (475d809,
|
||||
2024-07-14) project has a different take on patching. It uses preprocessor directives to decide
|
||||
whether or not to include a patch during build time. Essentially this means that this build, for
|
||||
better or worse, contains both the patched _and_ the original code. The aim being that you can
|
||||
select which patches to include and the build will contain that code and nothing more.
|
||||
|
4
drw.c
4
drw.c
@ -469,10 +469,8 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
||||
usedfont = drw->fonts;
|
||||
if (!ellipsis_width && render)
|
||||
ellipsis_width = drw_fontset_getwidth(drw, ellipsis);
|
||||
if (!invalid_width) {
|
||||
invalid_width = -1; /* stop infinite recursion */
|
||||
if (!invalid_width && render)
|
||||
invalid_width = drw_fontset_getwidth(drw, invalid);
|
||||
}
|
||||
while (1) {
|
||||
ew = ellipsis_len = utf8err = utf8strlen = 0;
|
||||
utf8str = text;
|
||||
|
Loading…
Reference in New Issue
Block a user