[hackers] [st] Small bugfix for makeglyphfontspecs call in drawregion || suigin

From: <git_AT_suckless.org>
Date: Fri, 15 May 2015 07:53:11 +0200 (CEST)

commit 89cf0fc597a2bcc16b1516c6f6d750a06175f1c7
Author: suigin <suigin_AT_national.shitposting.agency>
Date: Sat May 9 15:22:40 2015 -0700

    Small bugfix for makeglyphfontspecs call in drawregion
    
    Here's a patch that fixes a bug when calling `makedrawglyphfontspecs'
    in `drawregion'. Wasn't offseting the pointer into the input glyphs
    array by `x1'. The bug isn't causing any problems currently, because
    `drawregion' is always called with `x1' and `y1' values of 0, but if
    this ever changes in the future, the bug would certainly cause some
    problems.

diff --git a/st.c b/st.c
index c2da66b..73fe291 100644
--- a/st.c
+++ b/st.c
_AT_@ -3663,7 +3663,7 @@ drawregion(int x1, int y1, int x2, int y2) {
                 term.dirty[y] = 0;
 
                 specs = term.specbuf;
- numspecs = xmakeglyphfontspecs(specs, &term.line[y][0], x2 - x1, x1, y);
+ numspecs = xmakeglyphfontspecs(specs, &term.line[y][x1], x2 - x1, x1, y);
 
                 i = ox = 0;
                 for(x = x1; x < x2 && i < numspecs; x++) {
Received on Fri May 15 2015 - 07:53:11 CEST

This archive was generated by hypermail 2.3.0 : Fri May 15 2015 - 08:00:12 CEST