Fixed regression in clamped_add_16() that kept it from clamping. This was

quite noticeable in the BASS floppy intro.

Of course, if it turns out that 'int' is also only 16 bits it still won't
work, but in that case we run into problems even before this function is
called.

svn-id: r9145
This commit is contained in:
Torbjörn Andersson 2003-07-23 13:16:58 +00:00
parent dad1586daf
commit a327f805ac

View File

@ -469,7 +469,7 @@ protected:
}
};
static inline void clamped_add_16(int16& a, int16 b) {
static inline void clamped_add_16(int16& a, int b) {
int val = a + b;
if (val > 32767)