diff --git a/src/scripts/softpal/img/pgd/base.rs b/src/scripts/softpal/img/pgd/base.rs index af51095..fa61c48 100644 --- a/src/scripts/softpal/img/pgd/base.rs +++ b/src/scripts/softpal/img/pgd/base.rs @@ -207,9 +207,9 @@ impl PgdReader { let mut offset = points[i] as usize; let base_value = (input[src2 + offset] as i32) << 7; offset = dst + 3 * offset; - output[offset] = Self::clamp(base_value + b); - output[offset + 1] = Self::clamp(base_value + g); - output[offset + 2] = Self::clamp(base_value + r); + output[offset] = Self::clamp((base_value + b) >> 7); + output[offset + 1] = Self::clamp((base_value + g) >> 7); + output[offset + 2] = Self::clamp((base_value + r) >> 7); } src2 += 2; dst += 6;