Add patch found here: http://code.google.com/p/protobuf-c/issues/detail?id=29
authorfatbob313 <martin@fatbob.nu>
Thu, 7 Jan 2010 20:50:41 +0000 (20:50 +0000)
committerfatbob313 <martin@fatbob.nu>
Thu, 7 Jan 2010 20:50:41 +0000 (20:50 +0000)
src/google/protobuf-c/protobuf-c.c

index a7e765dbba90f86d4ff09250573dac0322ed0c77..89e3cb79e3ce9885250b319b3664f7522de88a1e 100644 (file)
@@ -685,7 +685,7 @@ required_field_pack (const ProtobufCFieldDescriptor *field,
     case PROTOBUF_C_TYPE_FIXED32:
     case PROTOBUF_C_TYPE_FLOAT:
       out[0] |= PROTOBUF_C_WIRE_TYPE_32BIT;
-      return rv + fixed32_pack (*(const uint64_t *) member, out + rv);
+      return rv + fixed32_pack (*(const uint32_t *) member, out + rv);
     case PROTOBUF_C_TYPE_SFIXED64:
     case PROTOBUF_C_TYPE_FIXED64:
     case PROTOBUF_C_TYPE_DOUBLE:
@@ -864,7 +864,7 @@ required_field_pack_to_buffer (const ProtobufCFieldDescriptor *field,
     case PROTOBUF_C_TYPE_FIXED32:
     case PROTOBUF_C_TYPE_FLOAT:
       scratch[0] |= PROTOBUF_C_WIRE_TYPE_32BIT;
-      rv += fixed32_pack (*(const uint64_t *) member, scratch + rv);
+      rv += fixed32_pack (*(const uint32_t *) member, scratch + rv);
       buffer->append (buffer, rv, scratch);
       break;
     case PROTOBUF_C_TYPE_SFIXED64: