From d351981f9e4f9ef5184e35e98ad14df305c91def Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 26 Feb 2009 01:55:39 -0800 Subject: Change to a fixed stack size. Proto2 only allows a nesting depth of 64, so we follow suit. --- tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests.c') diff --git a/tests.c b/tests.c index eaf703f..7a6e51b 100644 --- a/tests.c +++ b/tests.c @@ -47,7 +47,7 @@ void test_simple_proto() /* These are the examples from * http://code.google.com/apis/protocolbuffers/docs/encoding.html */ struct pbstream_fieldset *fieldset1 = malloc(sizeof(*fieldset1) + - 2*sizeof(struct pbstream_field)); + sizeof(struct pbstream_field[2])); fieldset1->num_fields = 2; fieldset1->fields[0].field_number = 1; fieldset1->fields[0].type = PBSTREAM_TYPE_INT32; @@ -79,7 +79,7 @@ void test_simple_proto() pbstream_free_parser(&s); struct pbstream_fieldset *fieldset2 = malloc(sizeof(*fieldset1) + - 3*sizeof(struct pbstream_field)); + sizeof(struct pbstream_field[3])); fieldset2->num_fields = 3; fieldset2->fields[2].field_number = 3; fieldset2->fields[2].type = PBSTREAM_TYPE_MESSAGE; -- cgit v1.2.3