8000 `nom::be_u32` is used instead of the `nom::le_u32` · Issue #4 · Roba1993/RAR · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
nom::be_u32 is used instead of the nom::le_u32 #4
Open
@Mingun

Description

@Mingun

According to the original unrar sources Little-endian should be used there:

RAR/src/head_block.rs

Lines 152 to 161 in b84da66

/// get a base header
named!(base_header(&[u8]) -> (HeadBlock),
do_parse!(
crc: be_u32 >>
size: vint >>
typ: vint >>
flags: vint >>
(HeadBlock::new(crc, size, typ.into(), flags.into()))
)
);

RAR/src/file_block.rs

Lines 68 to 79 in b84da66

if file.flags.time {
let (i, mtime) = be_u32(input)?;
input = i;
file.mtime = mtime;
}
// check for file crc data
if file.flags.crc {
let (i, crc) = be_u32(input)?;
input = i;
file.data_crc = crc;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0