mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-22 22:51:55 +01:00
Fix sign error when decoding bc5s images
Using an unsigned loop counter caused an implicit conversion breaking the decoder logic.
This commit is contained in:
parent
2d97b9fc2c
commit
d93c96de83
@ -131,11 +131,11 @@ namespace {
|
||||
}
|
||||
|
||||
if (c[0] > c[1]) {
|
||||
for (size_t i = 2; i < 8; ++i) {
|
||||
for (int i = 2; i < 8; ++i) {
|
||||
c[i] = ((8 - i) * c[0] + (i - 1) * c[1]) / 7;
|
||||
}
|
||||
} else {
|
||||
for (size_t i = 2; i < 6; ++i) {
|
||||
for (int i = 2; i < 6; ++i) {
|
||||
c[i] = ((6 - i) * c[0] + (i - 1) * c[1]) / 5;
|
||||
}
|
||||
c[6] = isSigned ? -128 : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user