cinera.c: Fix CollationBuffers->ProjectID test
This commit is contained in:
parent
966d616b48
commit
a1e8efe431
|
@ -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
|
||||||
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
|
||||||
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:
|
||||||
|
|
Loading…
Reference in New Issue