GDExtension: Ensure newline at EOF

This commit is contained in:
Rémi Verschelde 2022-11-07 14:31:10 +01:00
parent fc1c25d29d
commit 669888b9cf
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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;
json.instantiate();
String text = json->stringify(api, "\t", false);
String text = json->stringify(api, "\t", false) + "\n";
Ref<FileAccess> 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