aboutsummaryrefslogtreecommitdiff
path: root/include/cru/base
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-20 03:00:16 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-20 03:00:16 +0800
commit478b4cdce5c584c294d38f84a0131f239d9af88f (patch)
tree74ad9ae123869195c4ce845f9ce34c4425a62b3d /include/cru/base
parent2eb34dfc3dd3ca718da6ebf049886b4ae140b332 (diff)
downloadcru-478b4cdce5c584c294d38f84a0131f239d9af88f.tar.gz
cru-478b4cdce5c584c294d38f84a0131f239d9af88f.tar.bz2
cru-478b4cdce5c584c294d38f84a0131f239d9af88f.zip
Fix use after free in render object.
Diffstat (limited to 'include/cru/base')
-rw-r--r--include/cru/base/Guard.h1
-rw-r--r--include/cru/base/StringUtil.h4
2 files changed, 2 insertions, 3 deletions
diff --git a/include/cru/base/Guard.h b/include/cru/base/Guard.h
index 77e48d79..a23e2574 100644
--- a/include/cru/base/Guard.h
+++ b/include/cru/base/Guard.h
@@ -1,7 +1,6 @@
#pragma once
#include "Base.h"
-#include "cru/base/Base.h"
#include <cstdlib>
#include <functional>
diff --git a/include/cru/base/StringUtil.h b/include/cru/base/StringUtil.h
index 7748f0d3..dbc748d7 100644
--- a/include/cru/base/StringUtil.h
+++ b/include/cru/base/StringUtil.h
@@ -240,7 +240,7 @@ CodePoint CRU_BASE_API Utf8NextCodePoint(const Utf8CodeUnit* ptr, Index size,
inline CodePoint Utf8NextCodePoint(Utf8StringView str, Index current,
Index* next_position) {
- return Utf8NextCodePoint(str.data(), str.size(), next_position);
+ return Utf8NextCodePoint(str.data(), str.size(), current, next_position);
}
CodePoint CRU_BASE_API Utf8PreviousCodePoint(const Utf8CodeUnit* ptr,
@@ -249,7 +249,7 @@ CodePoint CRU_BASE_API Utf8PreviousCodePoint(const Utf8CodeUnit* ptr,
inline CodePoint Utf8PreviousCodePoint(Utf8StringView str, Index current,
Index* next_position) {
- return Utf8PreviousCodePoint(str.data(), str.size(), next_position);
+ return Utf8PreviousCodePoint(str.data(), str.size(), current, next_position);
}
namespace details {