mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[serialize] Make putting breakpoint on out-of-memory easier
This commit is contained in:
1 parent
2bd2750234
commit
7b863142ce
1 file changed
+4
-1
+4
-1
@@ -323,6 +323,9 @@ struct hb_serialize_context_t
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
err_ran_out_of_room () { this->ran_out_of_room = true; }
|
||||
|
||||
template <typename Type>
|
||||
Type *allocate_size (unsigned int size)
|
||||
{
|
||||
@@ -330,7 +333,7 @@ struct hb_serialize_context_t
|
||||
|
||||
if (this->tail - this->head < ptrdiff_t (size))
|
||||
{
|
||||
this->ran_out_of_room = true;
|
||||
err_ran_out_of_room ();
|
||||
this->successful = false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user