mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Fixed issue #218.
This commit is contained in:
@@ -375,7 +375,7 @@ namespace bx
|
||||
|
||||
inline const char* strRFindUnsafe(const char* _str, int32_t _len, char _ch)
|
||||
{
|
||||
for (int32_t ii = _len; 0 <= ii; --ii)
|
||||
for (int32_t ii = _len-1; 0 <= ii; --ii)
|
||||
{
|
||||
if (_str[ii] == _ch)
|
||||
{
|
||||
|
||||
@@ -188,6 +188,7 @@ TEST_CASE("strRFind", "")
|
||||
REQUIRE(bx::strRFind(bx::StringView(test, 0), 's').isEmpty() );
|
||||
REQUIRE(bx::strRFind(bx::StringView(test, 1), 's').isEmpty() );
|
||||
REQUIRE(&test[2] == bx::strRFind(test, 's').getPtr() );
|
||||
REQUIRE(&test[3] == bx::strRFind(test, 't').getPtr() );
|
||||
}
|
||||
|
||||
TEST_CASE("strFindI", "")
|
||||
|
||||
Reference in New Issue
Block a user