fixed a problem when backporting dwm's drawtext()
44e372bb
1 file(s) · +1 −1
| 226 | 226 | y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent; |
|
| 227 | 227 | x = dc.x + (h / 2); |
|
| 228 | 228 | /* shorten text if necessary */ |
|
| 229 | - | for(len = MIN(olen, sizeof buf); len && textnw(buf, len) > dc.w - h; len--); |
|
| 229 | + | for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--); |
|
| 230 | 230 | if(!len) |
|
| 231 | 231 | return; |
|
| 232 | 232 | memcpy(buf, text, len); |