diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index aed4654b7f9794268dcd027103856621c2cfdc20..452f444b792a9ff3f1fce8e88f20a73075f75db3 100644
--- a/src/xpdev/xpbeep.c
+++ b/src/xpdev/xpbeep.c
@@ -423,7 +423,7 @@ BOOL xptone(double freq, DWORD duration, enum WAVE_SHAPE shape)
 	/* Prepare for next note */
 	curr_wh=1-curr_wh;
 	memset(wave[curr_wh], 128, sizeof(wave));	/* Ensure that if silence DOES timeout, you still get silence */
-	wh=wh_bufs[curr_wh];
+	wh=&wh_bufs[curr_wh];
 	waveOutWrite(waveOut, wh, sizeof(wh_bufs[0]));
 
 	while(!(this_wh->dwFlags & WHDR_DONE))