We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d7ecdf commit f143e0cCopy full SHA for f143e0c
LuaParser/src/LuaTokenParser.cpp
@@ -169,9 +169,13 @@ int LuaTokenParser::GetColumn(int offset)
169
170
int bytesLength = offset - lineStartOffset;
171
172
- int utf8Length = ::utf8nlen(const_cast<const char*>(_source.data() + lineStartOffset),
173
- static_cast<std::size_t>(bytesLength));
174
- return utf8Length;
+#if __APPLE__
+ // git action 编译时在macos下编译会报错,我不觉得有什么问题
+ const char* macOsBug = const_cast<const char*>(_source.data() + lineStartOffset);
175
+ return ::utf8nlen(macOsBug, static_cast<std::size_t>(bytesLength));
176
+#else
177
+ return ::utf8nlen(_source.data() + lineStartOffset, static_cast<std::size_t>(bytesLength));
178
+#endif
179
}
180
181
int LuaTokenParser::GetTotalLine()
0 commit comments