summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-06-10 05:50:51 +0200
committerTimm Bäder <mail@baedert.org>2020-06-10 05:50:51 +0200
commit9983edf5294d2ae29dde8e49c7d4b94bff970ea1 (patch)
treea2bef9b9dd6dc495cf97180501ef96a26da69acc /pango
parent560b9b575792e1aa4faca4a0c159baa96b4a04e5 (diff)
downloadpango-9983edf5294d2ae29dde8e49c7d4b94bff970ea1.tar.gz
pango-context: avoid assignment to uninitialized value
We're assigning EMBEDDING_CHANGED to state->changed in update_embedding_end(). At that point state->changed is uninitialized, but that doesn't matter since we later override the value anyway. Just pull the initialization to earlier in that function, which assigns EMBEDDING_CHANGED anyway, so doesn't change anything.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index a64eb79f..7772878f 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1006,6 +1006,8 @@ itemize_state_init (ItemizeState *state,
state->item = NULL;
state->run_start = text + start_index;
+ state->changed = EMBEDDING_CHANGED | SCRIPT_CHANGED | LANG_CHANGED |
+ FONT_CHANGED | WIDTH_CHANGED | EMOJI_CHANGED;
/* First, apply the bidirectional algorithm to break
* the text into directional runs.
@@ -1079,7 +1081,6 @@ itemize_state_init (ItemizeState *state,
state->cache = NULL;
state->base_font = NULL;
- state->changed = EMBEDDING_CHANGED | SCRIPT_CHANGED | LANG_CHANGED | FONT_CHANGED | WIDTH_CHANGED | EMOJI_CHANGED;
}
static gboolean