mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-05 23:45:42 +00:00
fix tail comparisons
This commit is contained in:
committed by
Ryan Fleury
parent
c81c072018
commit
6ea9bfc5a3
@@ -3,8 +3,9 @@
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
#if !defined(MEM_STATIC)
|
||||
#ifndef MEM_STATIC
|
||||
# define MEM_STATIC
|
||||
# define MEM_API ASAN_NO_ADDR static inline
|
||||
# include "third_party/martins_memfun/memfun.h"
|
||||
#endif
|
||||
|
||||
@@ -281,7 +282,7 @@ str8_match(String8 a, String8 b, StringMatchFlags flags)
|
||||
{
|
||||
result = MemIsEqual(a.str, b.str, b.size);
|
||||
}
|
||||
else if(a.size == b.size && flags == StringMatchFlag_CaseInsensitive)
|
||||
else if (a.size == b.size && flags == StringMatchFlag_CaseInsensitive)
|
||||
{
|
||||
result = MemCompareI(a.str, b.str, a.size) == 0;
|
||||
}
|
||||
@@ -3087,6 +3088,7 @@ str8_compar(String8 a, String8 b, B32 ignore_case)
|
||||
else
|
||||
{
|
||||
cmp = MemCompare(a.str, b.str, size);
|
||||
cmp = cmp > 0 ? 1 : cmp < 0 ? -1 : 0;
|
||||
}
|
||||
|
||||
// shorter prefix must precede longer prefixes
|
||||
|
||||
Reference in New Issue
Block a user