Skip to content

Commit

Permalink
Fixed construction of empty configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Aug 14, 2023
1 parent 3efa7df commit 97c6f1b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ internal ReceivedLogEntries(ProtocolStream stream, MemoryAllocator<byte> allocat
var fingerprint = reader.ReadInt64(true);
var configLength = reader.ReadInt64(true);

Configuration = new(configLength > 0L ? allocator(checked((int)configLength)) : default, fingerprint);
Configuration = configLength > 0L
? new(fingerprint)
: new(allocator(checked((int)configLength)), fingerprint);
this.allocator = allocator;
}

Expand Down

0 comments on commit 97c6f1b

Please sign in to comment.