Browse Source

Fix generating default values for `StringName`

Cases other than `&""` were not processed correctly

(cherry picked from commit 6cd6c8923a6e623776502a9245f48cfc5c5baf50)
A Thousand Ships 1 năm trước cách đây
mục cha
commit
65058828a6
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      binding_generator.py

+ 2 - 0
binding_generator.py

@@ -2321,6 +2321,8 @@ def correct_default_value(value, type_name):
         return f"{type_name}()"
     if value.startswith("Array["):
         return f"{{}}"
+    if value.startswith("&"):
+        return value[1::]
     return value