Skip to content

Commit c0e5f80

Browse files
authored
Merge pull request #82 from capitalistspz/is-open-stream-fix
Correct check in `isOpenStream`
2 parents e8673cc + 63f7075 commit c0e5f80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ uint32_t Context::isOpenStream(int32_t streamID)
198198
return 0;
199199
}
200200

201-
if (static_cast<uint32_t>(streamID) >= m_streams.size())
201+
if (m_streams.find(streamID) == m_streams.cend())
202202
{
203-
LOG(LOG_ERR, "isOpenStream was called with an out-of-bounds stream ID\n");
203+
LOG(LOG_ERR, "isOpenStream was called with an invalid stream ID\n");
204204
return 0;
205205
}
206206

0 commit comments

Comments
 (0)