summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-05-23 15:54:59 +0200
committerTyge Løvset <[email protected]>2022-05-23 15:54:59 +0200
commitc7b940f721a17335b700cea4b017f207cdf4e07c (patch)
treeb73d1f3f1e349ff18b5872e5f64ce37caba8b45a
parent7349441c0c95b21da87f1a13176ac4014ed98ea8 (diff)
downloadSTC-modified-c7b940f721a17335b700cea4b017f207cdf4e07c.tar.gz
STC-modified-c7b940f721a17335b700cea4b017f207cdf4e07c.zip
Bugfix: cstr_find_s() returned bool. Fix return size_t.
-rw-r--r--include/stc/cstr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h
index 69ab8a2d..41479c30 100644
--- a/include/stc/cstr.h
+++ b/include/stc/cstr.h
@@ -199,7 +199,7 @@ STC_INLINE size_t cstr_find(cstr s, const char* search) {
return res ? res - str : cstr_npos;
}
-STC_INLINE bool cstr_find_s(cstr s, cstr search)
+STC_INLINE size_t cstr_find_s(cstr s, cstr search)
{ return cstr_find(s, cstr_str(&search)); }
STC_INLINE bool cstr_contains(cstr s, const char* search)