From 06efc6b12c69b0c778cd5d4dc1e9712b0dfb58ff Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 6 Jul 2009 03:00:15 -0700 Subject: Fixed a lot of bugs, parser and compiler now work a little! --- upbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upbc.c') diff --git a/upbc.c b/upbc.c index 2cda5e4..b27568e 100644 --- a/upbc.c +++ b/upbc.c @@ -58,7 +58,7 @@ static void write_header(struct upb_symtab_entry entries[], int num_entries, fprintf(stream, "typedef enum " UPB_STRFMT " {\n", UPB_STRARG(enum_name)); if(ed->set_flags.has.value) { for(uint32_t j = 0; j < ed->value->len; j++) { /* Foreach enum value. */ - google_protobuf_EnumValueDescriptorProto *v = ed->value->elements[i]; + google_protobuf_EnumValueDescriptorProto *v = ed->value->elements[j]; struct upb_string value_name = upb_strdup(*v->name); to_preproc(value_name); /* " GOOGLE_PROTOBUF_FIELDDESCRIPTORPROTO_TYPE_UINT32 = 13," */ -- cgit v1.2.3