From 669888b9cfa7458be025dacf1a34d0eaf791ae81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 7 Nov 2022 14:31:10 +0100 Subject: GDExtension: Ensure newline at EOF --- core/extension/extension_api_dump.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp index 96b396caa9..a2c507e350 100644 --- a/core/extension/extension_api_dump.cpp +++ b/core/extension/extension_api_dump.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "extension_api_dump.h" + #include "core/config/engine.h" #include "core/core_constants.h" #include "core/io/file_access.h" @@ -938,9 +939,9 @@ void NativeExtensionAPIDump::generate_extension_json_file(const String &p_path) Ref json; json.instantiate(); - String text = json->stringify(api, "\t", false); + String text = json->stringify(api, "\t", false) + "\n"; Ref fa = FileAccess::open(p_path, FileAccess::WRITE); - CharString cs = text.ascii(); - fa->store_buffer((const uint8_t *)cs.ptr(), cs.length()); + fa->store_string(text); } -#endif + +#endif // TOOLS_ENABLED -- cgit v1.2.3