summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-17 09:55:41 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-17 09:55:41 +0300
commita7877bb6b16bcca855768956bfc269e1ffedfe94 (patch)
tree0929c948baa152d3607b5ad853effd7c04503688 /src/ui/documentwidget.c
parent0c35ba1d098fe45af94dc3301dddff9a50ac68f3 (diff)
DocumentWidget: Undefined behavior
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index ee3d7104..42018e19 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3737,8 +3737,10 @@ static iBool render_DocumentWidget_(const iDocumentWidget *d, iDrawContext *ctx,
3737 iZap(ctx->runsDrawn); 3737 iZap(ctx->runsDrawn);
3738 render_GmDocument(d->doc, bufVisRange, drawRun_DrawContext_, ctx); 3738 render_GmDocument(d->doc, bufVisRange, drawRun_DrawContext_, ctx);
3739 meta->runsDrawn = ctx->runsDrawn; 3739 meta->runsDrawn = ctx->runsDrawn;
3740 meta->runsDrawn.start--; 3740 if (meta->runsDrawn.start) {
3741 meta->runsDrawn.end++; 3741 meta->runsDrawn.start--;
3742 meta->runsDrawn.end++;
3743 }
3742 buf->validRange = bufVisRange; 3744 buf->validRange = bufVisRange;
3743 // printf(" buffer %zu valid %d...%d\n", i, bufRange.start, bufRange.end); 3745 // printf(" buffer %zu valid %d...%d\n", i, bufRange.start, bufRange.end);
3744 } 3746 }