projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd8228
)
[serialize] Don't insert empty object into tree
author
Behdad Esfahbod
<behdad@behdad.org>
Sun, 31 Mar 2019 02:26:37 +0000
(19:26 -0700)
committer
Behdad Esfahbod
<behdad@behdad.org>
Sun, 31 Mar 2019 02:26:37 +0000
(19:26 -0700)
src/hb-serialize.hh
patch
|
blob
|
history
diff --git
a/src/hb-serialize.hh
b/src/hb-serialize.hh
index
e7873ab
..
3bbff75
100644
(file)
--- a/
src/hb-serialize.hh
+++ b/
src/hb-serialize.hh
@@
-160,6
+160,9
@@
struct hb_serialize_context_t
memmove (tail, obj.head, len);
head = obj.head;
+ if (!len)
+ return 0;
+
obj.head = tail;
obj.tail = tail + len;
@@
-304,7
+307,7
@@
struct hb_serialize_context_t
hb_vector_t<object_t> packed;
/* Map view of packed objects. */
- hb_hashmap_t<const object_t *, objidx_t> packed_map;
+ hb_hashmap_t<const object_t *, objidx_t
, nullptr, 0
> packed_map;
};