Skip to content

Commit 7d7ecdf

Browse files
committed
修复macos有毛病的问题
1 parent a867804 commit 7d7ecdf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
cd build
2020
cmake ..
2121
cmake --build . --config Release
22-
ctest --force-new-ctest-process -V -C Release
22+
ctest -V -C Release
2323
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/${{ runner.os }}/
2424
2525
- name: Upload

LuaParser/src/LuaTokenParser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ int LuaTokenParser::GetColumn(int offset)
169169

170170
int bytesLength = offset - lineStartOffset;
171171

172-
int utf8Length = ::utf8nlen(_source.data() + lineStartOffset, static_cast<std::size_t>(bytesLength));
172+
int utf8Length = ::utf8nlen(const_cast<const char*>(_source.data() + lineStartOffset),
173+
static_cast<std::size_t>(bytesLength));
173174
return utf8Length;
174175
}
175176

0 commit comments

Comments
 (0)