Commit a1e8efe4 by Matt Mascarenhas

cinera.c: Fix CollationBuffers->ProjectID test

parent 966d616b
......@@ -16,7 +16,7 @@ typedef struct
version CINERA_APP_VERSION = {
.Major = 0,
.Minor = 5,
.Patch = 59
.Patch = 60
};
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c
......@@ -3062,8 +3062,8 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen
if(!StringsDiffer(ProjectInfo[ProjectIndex].ProjectID,
HMML.metadata.project))
{
CopyString(CollationBuffers->ProjectID, sizeof(CollationBuffers->ProjectID), "%s", HMML.metadata.project);
CopyString(CollationBuffers->ProjectName, sizeof(CollationBuffers->ProjectName), "%s", ProjectInfo[ProjectIndex].FullName);
CopyStringNoFormat(CollationBuffers->ProjectID, sizeof(CollationBuffers->ProjectID), HMML.metadata.project);
CopyStringNoFormat(CollationBuffers->ProjectName, sizeof(CollationBuffers->ProjectName), ProjectInfo[ProjectIndex].FullName);
break;
}
}
......@@ -4465,12 +4465,12 @@ BuffersToHTML(buffers *CollationBuffers, template *Template, char *OutputPath, i
case TAG_PROJECT_ID:
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
{
fprintf(stderr, "Template contains a <!-- __CINERA_PROJECT_ID__ --> tag\n"
"Skipping just this tag, because no project ID is set\n");
CopyStringToBufferNoFormat(&Output, CollationBuffers->ProjectID); // NOTE(matt): Not HTML-safe
}
break;
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