Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 05ee0b0

Browse files
committed
gc: fix LOGGING
1 parent c116918 commit 05ee0b0

File tree

1 file changed

+3
-2
lines changed
  • src/gc/impl/conservative

1 file changed

+3
-2
lines changed

src/gc/impl/conservative/gc.d

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ debug (LOGGING)
156156

157157
void print() nothrow
158158
{
159-
printf(" p = %p, size = %zd, parent = %p ", p, size, parent);
159+
printf(" p = %p, size = %lld, parent = %p ", p, cast(ulong)size, parent);
160160
if (file)
161161
{
162162
printf("%s(%u)", file, line);
@@ -232,7 +232,8 @@ debug (LOGGING)
232232

233233
void copy(LogArray *from) nothrow @nogc
234234
{
235-
reserve(from.dim - dim);
235+
if (allocdim < from.dim)
236+
reserve(from.dim - dim);
236237
assert(from.dim <= allocdim);
237238
memcpy(data, from.data, from.dim * Log.sizeof);
238239
dim = from.dim;

0 commit comments

Comments
 (0)