Skip to content

Commit

Permalink
json dump fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitre committed Aug 21, 2024
1 parent d1e3854 commit e6cbbcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OFPROJECTGENERATOR_MAJOR_VERSION 0
#define OFPROJECTGENERATOR_MINOR_VERSION 70
#define OFPROJECTGENERATOR_MINOR_VERSION 71
#define OFPROJECTGENERATOR_PATCH_VERSION 0

#define PG_VERSION "0.70.0"
#define PG_VERSION "0.71.0"
7 changes: 6 additions & 1 deletion commandLine/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,13 @@ bool xcodeProject::saveProjectFile(){


std::ofstream jsonFile(fileName);
auto dump = j.dump(1, ' ');
if (dump[0] == '[') {
dump = j[0].dump(1, ' ');
}

try {
jsonFile << j.dump(1, ' ');
jsonFile << dump;
} catch(std::exception & e) {
ofLogError("xcodeProject::saveProjectFile") << "Error saving json to " << fileName << ": " << e.what();
return false;
Expand Down

0 comments on commit e6cbbcb

Please sign in to comment.