mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-06 15:48:47 +00:00
Merge pull request #7 from bvisness/right-side-sloppy
Fix overflow bug with MD_StringMatchFlag_RightSideSloppy
This commit is contained in:
+1
-1
@@ -962,7 +962,7 @@ MD_S8Match(MD_String8 a, MD_String8 b, MD_MatchFlags flags)
|
|||||||
if(a.size == b.size || flags & MD_StringMatchFlag_RightSideSloppy)
|
if(a.size == b.size || flags & MD_StringMatchFlag_RightSideSloppy)
|
||||||
{
|
{
|
||||||
result = 1;
|
result = 1;
|
||||||
for(MD_u64 i = 0; i < a.size; i += 1)
|
for(MD_u64 i = 0; i < a.size && i < b.size; i += 1)
|
||||||
{
|
{
|
||||||
MD_b32 match = (a.str[i] == b.str[i]);
|
MD_b32 match = (a.str[i] == b.str[i]);
|
||||||
if(flags & MD_StringMatchFlag_CaseInsensitive)
|
if(flags & MD_StringMatchFlag_CaseInsensitive)
|
||||||
|
|||||||
Reference in New Issue
Block a user