Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit faa8e2e

Browse files
committed
libfoundation: Allow nil buffer when creating 0-length input stream
1 parent 49e2dca commit faa8e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libfoundation/src/foundation-stream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static MCStreamCallbacks kMCMemoryInputStreamCallbacks =
145145
MC_DLLEXPORT_DEF
146146
bool MCMemoryInputStreamCreate(const void *p_block, size_t p_size, MCStreamRef& r_stream)
147147
{
148-
MCAssert(nil != p_block);
148+
MCAssert(nil != p_block || 0 == p_size);
149149

150150
MCStreamRef t_stream;
151151
if (!MCStreamCreate(&kMCMemoryInputStreamCallbacks, sizeof(__MCMemoryInputStream), t_stream))

0 commit comments

Comments
 (0)