aboutsummaryrefslogtreecommitdiff
path: root/src/sc_parse.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-02-13 21:05:00 +0100
committerThomas White <taw@bitwiz.org.uk>2015-02-14 11:37:16 +0100
commit7c4cc4fab04d5cb0c2727d8722c7469c1828b9ad (patch)
tree7ec81b0ec9c98c22f7fd195a84716b38c06cd40f /src/sc_parse.c
parent2fe70062dde423fb1230be6a30818b1ece917796 (diff)
Fix serialization of StoryCode
Diffstat (limited to 'src/sc_parse.c')
-rw-r--r--src/sc_parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sc_parse.c b/src/sc_parse.c
index 0f8e893..e4f0e0e 100644
--- a/src/sc_parse.c
+++ b/src/sc_parse.c
@@ -258,6 +258,14 @@ void save_sc_block(FILE *fh, const SCBlock *bl)
fprintf(fh, "%s", bl->contents);
}
+ /* Special case to prevent "\somethingSome text" */
+ if ( (bl->name != NULL) && (bl->options == NULL)
+ && (bl->contents == NULL) && (bl->next != NULL)
+ && (bl->next->name == NULL) && (bl->child == NULL) )
+ {
+ fprintf(fh, "{}");
+ }
+
}
if ( bl->child != NULL ) {