Skip to content

Commit

Permalink
[v3.8.5] Fix constructing spine::String with null pointer.
Browse files Browse the repository at this point in the history
It's a bug from v3.8.5-beta0.
  • Loading branch information
dumganhar committed Dec 15, 2024
1 parent 2a10e0c commit 57a9c75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion native/cocos/editor-support/spine/SpineString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ String::String(const char *chars, size_t len, bool own) {
}
}

String::String(const char *chars, bool own/* = false*/): String(chars, strlen(chars), own) {
String::String(const char *chars, bool own/* = false*/)
: String(chars, (chars ? strlen(chars) : 0), own) {
}

String::String(const String &other) {
Expand Down

0 comments on commit 57a9c75

Please sign in to comment.