diff --git a/build_version.py b/build_version.py index 480a2d3..f4b4fe2 100644 --- a/build_version.py +++ b/build_version.py @@ -1,3 +1,3 @@ -version = "v0.1.3" +version = "v0.1.4-dev" print("BUILD_VERSION=" + version) diff --git a/demo/addons/gd-eos/gdeos.gdextension b/demo/addons/gd-eos/gdeos.gdextension index a7d9ab3..c4712b5 100644 --- a/demo/addons/gd-eos/gdeos.gdextension +++ b/demo/addons/gd-eos/gdeos.gdextension @@ -1,6 +1,6 @@ [infomation] name = "GD-EOS" -version = "v0.1.3-dev" +version = "v0.0.0" decription = "A Epic Online Services plugin for Godot" author = "忘忧の (Daylily Zeleen)" email = "daylily-zeleen@foxmail.com" diff --git a/gd_eos/eos_code_generator.py b/gd_eos/eos_code_generator.py index b1e2581..9389e35 100644 --- a/gd_eos/eos_code_generator.py +++ b/gd_eos/eos_code_generator.py @@ -2004,7 +2004,7 @@ def __expend_input_struct( elif _is_str_type(field_type, field): r_declare_args.append(f"const String &p_{snake_field}") r_prepare_lines.append(f"\tCharString utf8_{snake_field} = p_{snake_field}.utf8();") - r_prepare_lines.append(f"\t{options_field} = to_eos_type(utf8_{snake_field});") + r_prepare_lines.append(f"\t{options_field} = to_eos_type(utf8_{snake_field});") elif _is_str_arr_type(field_type, field): r_declare_args.append(f"const PackedStringArray &p_{snake_field}") option_count_field = f"{arg_name}.{_find_count_field(field, fields.keys())}" diff --git a/gd_eos/include/core/utils.h b/gd_eos/include/core/utils.h index 337082e..821e56d 100644 --- a/gd_eos/include/core/utils.h +++ b/gd_eos/include/core/utils.h @@ -253,7 +253,10 @@ template <> CharString to_godot_type(const cstr_t p_from) { return { p_from }; } template <> cstr_t to_eos_type(const CharString &p_from) { - return p_from.size() == 1 ? nullptr : (char *)p_from.ptr(); + if (p_from.size() == 0 || p_from.get(0) == 0) { + return nullptr; + } + return (char *)p_from.ptr(); } template <> cstr_t to_eos_type(CharString p_from) {