summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/sconv.c')
-rw-r--r--src/pulsecore/sconv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/sconv.c b/src/pulsecore/sconv.c
index 29a9a453..d89f4283 100644
--- a/src/pulsecore/sconv.c
+++ b/src/pulsecore/sconv.c
@@ -75,7 +75,7 @@ static void u8_from_s16ne(unsigned n, const int16_t *a, uint8_t *b) {
pa_assert(b);
for (; n > 0; n--, a++, b++)
- *b = (uint8_t) (*a / 0x100 + 0x80);
+ *b = (uint8_t) ((uint16_t) *a >> 8) + (uint8_t) 0x80U;
}
/* float32 */