Skip to content

Commit 6f3bd49

Browse files
committed
Merge branch 'pr/46'
2 parents 8c8a7e3 + 9ba9c85 commit 6f3bd49

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common/emitter.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
void* tb_out_reserve(TB_Emitter* o, size_t count) {
88
if (o->count + count >= o->capacity) {
99
if (o->capacity == 0) {
10-
o->capacity = 64;
10+
if (count < 64) {
11+
o->capacity = 64;
12+
} else {
13+
o->capacity = count;
14+
}
1115
} else {
1216
o->capacity += count;
1317
o->capacity *= 2;

0 commit comments

Comments
 (0)