[nostalgia/studio] Replace garbage last character with \n
This commit is contained in:
parent
fc246ee396
commit
d4983cf3c6
@ -105,4 +105,4 @@ O1;net.drinkingtea.ox.DescriptorType;1;{
|
|||||||
],
|
],
|
||||||
"primitiveType" : 5,
|
"primitiveType" : 5,
|
||||||
"typeName" : "net.drinkingtea.nostalgia.core.NostalgiaGraphic"
|
"typeName" : "net.drinkingtea.nostalgia.core.NostalgiaGraphic"
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,4 @@ O1;net.drinkingtea.ox.DescriptorType;1;{
|
|||||||
],
|
],
|
||||||
"primitiveType" : 5,
|
"primitiveType" : 5,
|
||||||
"typeName" : "net.drinkingtea.nostalgia.core.NostalgiaPalette"
|
"typeName" : "net.drinkingtea.nostalgia.core.NostalgiaPalette"
|
||||||
}
|
}
|
||||||
|
@ -104,8 +104,8 @@ void Project::writeObj(QString path, T *obj) const {
|
|||||||
const auto type = ox::buildTypeDef(obj);
|
const auto type = ox::buildTypeDef(obj);
|
||||||
auto typeOut = ox::writeClaw(type.value, ox::ClawFormat::Organic);
|
auto typeOut = ox::writeClaw(type.value, ox::ClawFormat::Organic);
|
||||||
oxThrowError(typeOut);
|
oxThrowError(typeOut);
|
||||||
// erase garbage last character
|
// replace garbage last character with new line
|
||||||
typeOut.value.pop_back();
|
typeOut.value.back() = '\n';
|
||||||
// write to FS
|
// write to FS
|
||||||
QString descPath = "/.nostalgia/type_descriptors/";
|
QString descPath = "/.nostalgia/type_descriptors/";
|
||||||
const auto typePath = descPath + type.value->typeName.c_str();
|
const auto typePath = descPath + type.value->typeName.c_str();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user