Skip to content

Commit

Permalink
Resolve feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Oct 28, 2023
1 parent 34f4b1b commit e53219f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shared/utils/il2cpp-utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace il2cpp_utils {
// if null string input,
// return an empty allocated il2cpp string
if (inp.data() == nullptr) {
return newcsstr<creationType>("");
return newcsstr<creationType>(u"");
}

if constexpr (creationType == CreationType::Manual) {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/typedefs-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ Il2CppString* alloc_str(std::string_view str) {
il2cpp_functions::Init();

if (str.data() == nullptr) {
return il2cpp_functions::string_new_len("\0", 0);
return il2cpp_functions::string_new_len("", 0);
}

return il2cpp_functions::string_new_len(str.data(), str.size());
}
Il2CppString* alloc_str(std::u16string_view str) {
il2cpp_functions::Init();
if (str.data() == nullptr) {
return il2cpp_functions::string_new_len("\0", 0);
return il2cpp_functions::string_new_len("", 0);
}

return il2cpp_functions::string_new_utf16((Il2CppChar const*)str.data(), str.size());
Expand Down

0 comments on commit e53219f

Please sign in to comment.