Skip to content

alignment error in FCReadFloat64 on 32 bit devices #19

@matt3

Description

@matt3

Occasionally get an alignment error on 32 bit devices. This fix works for me:

static id FCReadFloat64(__unsafe_unretained FCNSDecoder* decoder) {
  FC_ALIGN_INPUT(double_t, *decoder->_offset);
  FC_READ_VALUE(uint64_t, *decoder->_offset, decoder->_input, decoder->_total);
  __autoreleasing NSNumber* number = @(*(double_t*)&value);
  return number;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions