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.
master
suigin 2015-05-09 15:22:40 -07:00 committed by Roberto E. Vargas Caballero
parent ae1923d275
commit 89cf0fc597
1 changed files with 1 additions and 1 deletions

2
st.c
View File

@ -3663,7 +3663,7 @@ drawregion(int x1, int y1, int x2, int y2) {
term.dirty[y] = 0; term.dirty[y] = 0;
specs = term.specbuf; 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; i = ox = 0;
for(x = x1; x < x2 && i < numspecs; x++) { for(x = x1; x < x2 && i < numspecs; x++) {