diff options
author | Ludvig Strigeus | 2001-11-06 07:47:01 +0000 |
---|---|---|
committer | Ludvig Strigeus | 2001-11-06 07:47:01 +0000 |
commit | 65fc6958d7fbd6af1720d2156951e79e89d67d1a (patch) | |
tree | f8cd5152d2fd5ad7a08ad3420d1a512f1ef7d230 /windows.cpp | |
parent | e2f1fef1f92b1646cf9faa2eb23a47f393b245da (diff) | |
download | scummvm-rg350-65fc6958d7fbd6af1720d2156951e79e89d67d1a.tar.gz scummvm-rg350-65fc6958d7fbd6af1720d2156951e79e89d67d1a.tar.bz2 scummvm-rg350-65fc6958d7fbd6af1720d2156951e79e89d67d1a.zip |
fixed integer overflow for large sounds
svn-id: r3458
Diffstat (limited to 'windows.cpp')
-rw-r--r-- | windows.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/windows.cpp b/windows.cpp index a0edf79cda..c0505968c7 100644 --- a/windows.cpp +++ b/windows.cpp @@ -17,6 +17,9 @@ * * Change Log: * $Log$ + * Revision 1.11 2001/11/06 07:47:00 strigeus + * fixed integer overflow for large sounds + * * Revision 1.10 2001/11/05 20:44:34 strigeus * speech support * @@ -873,7 +876,7 @@ void playSfxSound(void *sound, uint32 size, uint rate) { _sfx_pos = 0; _sfx_fp_speed = (1<<16) * rate / 22050; _sfx_fp_pos = 0; - debug(1, "size=%d, rate=%d", size, rate); + while (size&0xFFFF0000) size>>=1, rate>>=1; _sfx_size = size * 22050 / rate; } |