Skip to content

Commit d2e8e7c

Browse files
committed
Unit tests: fix off-by-one error in last_error test. Many thanks to @tobiasherzke for debugging the issue
1 parent f62b3bd commit d2e8e7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/test_ext_streaminfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ TEST_CASE("multithreaded lsl_last_error", "[threading][basic]") {
2020

2121
/// Ensure that an overly long error message won't overflow the buffer
2222
TEST_CASE("lsl_last_error size", "[basic]") {
23-
std::string invalidquery(512, '\'');
23+
std::string invalidquery(511, '\'');
2424
CHECK_THROWS(lsl::resolve_stream(invalidquery, 1, 0.1));
25-
REQUIRE(lsl_last_error()[512] == 0);
25+
REQUIRE(lsl_last_error()[511] == 0);
2626
}
2727
} // namespace

0 commit comments

Comments
 (0)