Commit a1e8efe4 authored by Matt Mascarenhas's avatar Matt Mascarenhas

cinera.c: Fix CollationBuffers->ProjectID test

parent 966d616b
...@@ -16,7 +16,7 @@ typedef struct ...@@ -16,7 +16,7 @@ typedef struct
version CINERA_APP_VERSION = { version CINERA_APP_VERSION = {
.Major = 0, .Major = 0,
.Minor = 5, .Minor = 5,
.Patch = 59 .Patch = 60
}; };
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c // TODO(matt): Copy in the DB 3 stuff from cinera_working.c
...@@ -3062,8 +3062,8 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen ...@@ -3062,8 +3062,8 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen
if(!StringsDiffer(ProjectInfo[ProjectIndex].ProjectID, if(!StringsDiffer(ProjectInfo[ProjectIndex].ProjectID,
HMML.metadata.project)) HMML.metadata.project))
{ {
CopyString(CollationBuffers->ProjectID, sizeof(CollationBuffers->ProjectID), "%s", HMML.metadata.project); CopyStringNoFormat(CollationBuffers->ProjectID, sizeof(CollationBuffers->ProjectID), HMML.metadata.project);
CopyString(CollationBuffers->ProjectName, sizeof(CollationBuffers->ProjectName), "%s", ProjectInfo[ProjectIndex].FullName); CopyStringNoFormat(CollationBuffers->ProjectName, sizeof(CollationBuffers->ProjectName), ProjectInfo[ProjectIndex].FullName);
break; break;
} }
} }
...@@ -4465,12 +4465,12 @@ BuffersToHTML(buffers *CollationBuffers, template *Template, char *OutputPath, i ...@@ -4465,12 +4465,12 @@ BuffersToHTML(buffers *CollationBuffers, template *Template, char *OutputPath, i
case TAG_PROJECT_ID: case TAG_PROJECT_ID:
if(CollationBuffers->ProjectID[0] == '\0') if(CollationBuffers->ProjectID[0] == '\0')
{ {
CopyStringToBufferNoFormat(&Output, CollationBuffers->ProjectID); // NOTE(matt): Not HTML-safe fprintf(stderr, "Template contains a <!-- __CINERA_PROJECT_ID__ --> tag\n"
"Skipping just this tag, because no project ID is set\n");
} }
else else
{ {
fprintf(stderr, "Template contains a <!-- __CINERA_PROJECT_ID__ --> tag\n" CopyStringToBufferNoFormat(&Output, CollationBuffers->ProjectID); // NOTE(matt): Not HTML-safe
"Skipping just this tag, because no project ID is set\n");
} }
break; break;
case TAG_PROJECT: case TAG_PROJECT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment