diff options
author | Carl Worth <cworth@cworth.org> | 2005-08-17 09:51:09 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-08-17 09:51:09 +0000 |
commit | 639680e5fe2592c76d19e8102919ef3062371883 (patch) | |
tree | 10e9933ec6f854d2f9a9f28ff25e2ea9fadd7d9a /src/cairo-cache.c | |
parent | f5f21a768d71f2a6897b5290f74fd41116c43966 (diff) | |
download | cairo-639680e5fe2592c76d19e8102919ef3062371883.tar.gz |
Fixes for bug #4110:
Don't call _cairo_ft_unscaled_font_init_key in the from_face case, just clear filename and id instead. Initialize unscaled->base first so that initialization order matches the structure declaration order.
Fix to accept a NULL string and hash it identically to a zero-length string.
Add a test that calls cairo_ft_font_create_for_ft_face to demonstrate bug #4110.
Diffstat (limited to 'src/cairo-cache.c')
-rw-r--r-- | src/cairo-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-cache.c b/src/cairo-cache.c index a0c202223..b43bccabf 100644 --- a/src/cairo-cache.c +++ b/src/cairo-cache.c @@ -512,7 +512,7 @@ _cairo_hash_string (const char *c) { /* This is the djb2 hash. */ unsigned long hash = 5381; - while (*c) + while (c && *c) hash = ((hash << 5) + hash) + *c++; return hash; } |