summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-13 18:39:16 +0000
committerDavid Robillard <d@drobilla.net>2012-05-13 18:39:16 +0000
commitb1f2f7b57848ca84d9d4230e7f9a875831b549e7 (patch)
tree99cb5f66a88b4fc1d6dd35c4d4f7efe54850e9b5 /src
parente951d1d5799f5fbdef44360dd9ec4539c25d5ce7 (diff)
downloadingen-b1f2f7b57848ca84d9d4230e7f9a875831b549e7.tar.gz
ingen-b1f2f7b57848ca84d9d4230e7f9a875831b549e7.tar.bz2
ingen-b1f2f7b57848ca84d9d4230e7f9a875831b549e7.zip
Avoid possibly creating a variable length array of size 0.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4385 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/InputPort.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp
index b3819715..ebe5d41d 100644
--- a/src/server/InputPort.cpp
+++ b/src/server/InputPort.cpp
@@ -184,7 +184,7 @@ InputPort::pre_process(Context& context)
_buffers->at(v)->prepare_read(context);
}
} else {
- uint32_t max_num_srcs = 0;
+ uint32_t max_num_srcs = 1;
for (Edges::const_iterator e = _edges.begin(); e != _edges.end(); ++e) {
max_num_srcs += e->tail()->poly();
}