Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] No conversion from int to uint in BKTRSubsectionEncryptedStream #17

Open
Clearmist opened this issue Jul 15, 2023 · 0 comments
Open

Comments

@Clearmist
Copy link

Clearmist commented Jul 15, 2023

Hi! :)

When compiling with C++20 (also confirmed with C++17) I've come across this error that prevents compilation.

https://github.com/jakcron/libpietendo/blob/194b77d6ea9077dda6b03a79c593d2c1f2f7e9f2/src/hac/BKTRSubsectionEncryptedStream.cpp#L75C9-L75C9

Location

/src/hac/BKTRSubsectionEncryptedStream.cpp:75

int64_t end_offset = (j + 1 == subsection.header.entry_count) ? subsection.header.end_offset_bucket : subsection.entries[j + 1].offset;

Error message

libpietendo\src\hac\BKTRSubsectionEncryptedStream.cpp(75,137): error C2446: ':': no conversion from 'const tc::bn::le64<int64_t>' to 'const tc::bn::le64<uint64_t>'

no conversion from 'const tc::bn::le64<int64_t>' to 'const tc::bn::le64<uint64_t>'

Possible fix

int64_t end_offset = (j + 1 == subsection.header.entry_count) ? (int64_t) subsection.header.end_offset_bucket : subsection.entries[j + 1].offset;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant