[core] Fix logcat tag len (#1022)
It's an ASOP's bug that tag len is 1 larger
This commit is contained in:
parent
4eeadd02d6
commit
4c4dda340a
|
|
@ -115,6 +115,10 @@ void Logcat::ProcessBuffer(struct log_msg *buf) {
|
||||||
AndroidLogEntry entry;
|
AndroidLogEntry entry;
|
||||||
if (android_log_processLogBuffer(&buf->entry, &entry) < 0) return;
|
if (android_log_processLogBuffer(&buf->entry, &entry) < 0) return;
|
||||||
|
|
||||||
|
if (entry.tagLen >= 1 && entry.tag[entry.tagLen - 1] == '\0') [[likely]] {
|
||||||
|
--entry.tagLen;
|
||||||
|
}
|
||||||
|
|
||||||
std::string_view tag(entry.tag, entry.tagLen);
|
std::string_view tag(entry.tag, entry.tagLen);
|
||||||
bool shortcut = false;
|
bool shortcut = false;
|
||||||
if (tag == "LSPosed-Bridge"sv || tag == "XSharedPreferences"sv) [[unlikely]] {
|
if (tag == "LSPosed-Bridge"sv || tag == "XSharedPreferences"sv) [[unlikely]] {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue