Browse Source

Fix segfault when number of rows is equal to or exceeds BND_MAX_ROWS.

pull/1/head
Christoph Scholtes 7 years ago
parent
commit
708d5c36da
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      blendish.h

+ 1
- 1
blendish.h View File

@@ -2240,7 +2240,7 @@ static void bndCaretPosition(NVGcontext *ctx, float x, float y,
int *cr, float *cx, float *cy) {
static NVGglyphPosition glyphs[BND_MAX_GLYPHS];
int r,nglyphs;
for (r=0; r < nrows && rows[r].end < caret; ++r);
for (r=0; r < nrows-1 && rows[r].end < caret; ++r);
*cr = r;
*cx = x;
*cy = y-lineHeight-desc + r*lineHeight;


Loading…
Cancel
Save