diff --git a/examples/js-pub.c b/examples/js-pub.c index 791ba8139..142fcddb7 100644 --- a/examples/js-pub.c +++ b/examples/js-pub.c @@ -88,6 +88,7 @@ int main(int argc, char **argv) cfg.Name = stream; // Set the subject cfg.Subjects = (const char*[1]){subj}; + // Set the subject count cfg.SubjectsLen = 1; // Make it a memory stream. cfg.Storage = js_MemoryStorage; diff --git a/examples/js-sub.c b/examples/js-sub.c index edb279d02..30fe1dbe4 100644 --- a/examples/js-sub.c +++ b/examples/js-sub.c @@ -111,6 +111,7 @@ int main(int argc, char **argv) cfg.Name = stream; // Set the subject cfg.Subjects = (const char*[1]){subj}; + // Set the subject count cfg.SubjectsLen = 1; // Make it a memory stream. cfg.Storage = js_MemoryStorage;