summaryrefslogtreecommitdiff
path: root/src/cairo-scaled-font.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2022-04-17 13:49:30 +0930
committerAdrian Johnson <ajohnson@redneon.com>2022-04-19 19:58:44 +0930
commit1cc23206bde186d4aef948bba11e591120c99dcd (patch)
tree0599c4ee38904a1bc7e805eced11ca690af6e457 /src/cairo-scaled-font.c
parent6454f65ec5b5ce7e7aa93fabcf9b5957f617cabe (diff)
downloadcairo-1cc23206bde186d4aef948bba11e591120c99dcd.tar.gz
Fix scaled_glyph hash lookup on Win64
This was failing due to sizeof(uintptr_t) != sizeof(long) on Win64
Diffstat (limited to 'src/cairo-scaled-font.c')
-rwxr-xr-xsrc/cairo-scaled-font.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index e0b586589..30611dca4 100755
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -3001,6 +3001,7 @@ _cairo_scaled_glyph_lookup (cairo_scaled_font_t *scaled_font,
cairo_int_status_t status = CAIRO_INT_STATUS_SUCCESS;
cairo_scaled_glyph_t *scaled_glyph;
cairo_scaled_glyph_info_t need_info;
+ cairo_hash_entry_t key;
*scaled_glyph_ret = NULL;
@@ -3019,8 +3020,8 @@ _cairo_scaled_glyph_lookup (cairo_scaled_font_t *scaled_font,
/*
* Check cache for glyph
*/
- scaled_glyph = _cairo_hash_table_lookup (scaled_font->glyphs,
- (cairo_hash_entry_t *) &index);
+ key.hash = index;
+ scaled_glyph = _cairo_hash_table_lookup (scaled_font->glyphs, &key);
if (scaled_glyph == NULL) {
status = _cairo_scaled_font_allocate_glyph (scaled_font, &scaled_glyph);
if (unlikely (status))