Skip to content

Commit 452683c

Browse files
committed
适应macos bug
1 parent f143e0c commit 452683c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LuaParser/src/LuaTokenParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ int LuaTokenParser::GetColumn(int offset)
171171

172172
#if __APPLE__
173173
// git action 编译时在macos下编译会报错,我不觉得有什么问题
174-
const char* macOsBug = const_cast<const char*>(_source.data() + lineStartOffset);
174+
const char8_t* macOsBug = reinterpret_cast<const char8_t*>(_source.data() + lineStartOffset);
175175
return ::utf8nlen(macOsBug, static_cast<std::size_t>(bytesLength));
176176
#else
177177
return ::utf8nlen(_source.data() + lineStartOffset, static_cast<std::size_t>(bytesLength));

0 commit comments

Comments
 (0)