From 89701783174f863ec498f4be2185dd19e23db5b6 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 4 Nov 2009 04:27:55 +0000 Subject: [PATCH] Merge r3758 from trunk. Originally committed to SVN as r3759. --- aegisub/src/audio_player_dsound2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/audio_player_dsound2.cpp b/aegisub/src/audio_player_dsound2.cpp index c336c287b..58aa63d0f 100644 --- a/aegisub/src/audio_player_dsound2.cpp +++ b/aegisub/src/audio_player_dsound2.cpp @@ -395,8 +395,9 @@ do_fill_buffer: DWORD buf1sz, buf2sz; void *buf1, *buf2; + assert(bytes_needed > 0); assert(buffer_offset < bufSize); - assert(bytes_needed <= bufSize); + assert((DWORD)bytes_needed <= bufSize); HRESULT res = bfr->Lock(buffer_offset, bytes_needed, &buf1, &buf1sz, &buf2, &buf2sz, 0); switch (res)