SciresM / hactool

hactool is a tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives.
ISC License
982 stars 151 forks source link

Update nca.c #98

Closed Furoryan closed 3 years ago

Furoryan commented 3 years ago

When reading a very small amount of bytes, sector_ofs must be added to the next fseek, because the function nca_section_fseek doesn't use sector_ofs, it only affects a new value to it, and the line 200 "ctx->sector_ofs += count" would be useless otherwise (sector_ofs is reset to 0, instead of being incremented).