From d4983cf3c65e87db52fa85e670a04436ec0b8cb0 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 17 Jun 2020 01:41:31 -0500 Subject: [PATCH] [nostalgia/studio] Replace garbage last character with \n --- .../net.drinkingtea.nostalgia.core.NostalgiaGraphic | 2 +- .../net.drinkingtea.nostalgia.core.NostalgiaPalette | 2 +- src/nostalgia/studio/lib/project.hpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaGraphic b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaGraphic index 7a070659..3ea7009c 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaGraphic +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaGraphic @@ -105,4 +105,4 @@ O1;net.drinkingtea.ox.DescriptorType;1;{ ], "primitiveType" : 5, "typeName" : "net.drinkingtea.nostalgia.core.NostalgiaGraphic" -} \ No newline at end of file +} diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaPalette b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaPalette index 1566a340..cfb86842 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaPalette +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.NostalgiaPalette @@ -13,4 +13,4 @@ O1;net.drinkingtea.ox.DescriptorType;1;{ ], "primitiveType" : 5, "typeName" : "net.drinkingtea.nostalgia.core.NostalgiaPalette" -} \ No newline at end of file +} diff --git a/src/nostalgia/studio/lib/project.hpp b/src/nostalgia/studio/lib/project.hpp index 00a362a8..8266f937 100644 --- a/src/nostalgia/studio/lib/project.hpp +++ b/src/nostalgia/studio/lib/project.hpp @@ -104,8 +104,8 @@ void Project::writeObj(QString path, T *obj) const { const auto type = ox::buildTypeDef(obj); auto typeOut = ox::writeClaw(type.value, ox::ClawFormat::Organic); oxThrowError(typeOut); - // erase garbage last character - typeOut.value.pop_back(); + // replace garbage last character with new line + typeOut.value.back() = '\n'; // write to FS QString descPath = "/.nostalgia/type_descriptors/"; const auto typePath = descPath + type.value->typeName.c_str();