Commit 525590fa authored by Matt Mascarenhas's avatar Matt Mascarenhas

cinera.c: Prevent crash when no ProjectInfo->Unit

parent d420513e
...@@ -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 = 48 .Patch = 49
}; };
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c // TODO(matt): Copy in the DB 3 stuff from cinera_working.c
...@@ -5503,7 +5503,7 @@ IndexToBuffer(index *Index, buffers *CollationBuffers) // NOTE(matt): This guy m ...@@ -5503,7 +5503,7 @@ IndexToBuffer(index *Index, buffers *CollationBuffers) // NOTE(matt): This guy m
} }
char Number[16]; char Number[16];
index_metadata *This; index_metadata *This;
char Text[StringLength(ProjectUnit) + sizeof(Number) + sizeof(This->Title) + 3]; char Text[ProjectUnit ? StringLength(ProjectUnit) : 0 + sizeof(Number) + sizeof(This->Title) + 3];
int EntryLength = StringLength(PlayerURL.Location) + sizeof(Text) + 82; int EntryLength = StringLength(PlayerURL.Location) + sizeof(Text) + 82;
CollationBuffers->Index.Size = StringLength(queryContainer) + (Index->Header.EntryCount * EntryLength) + StringLength(Script); CollationBuffers->Index.Size = StringLength(queryContainer) + (Index->Header.EntryCount * EntryLength) + StringLength(Script);
......
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