more of these
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 May 2007 21:11:39 +0000 (21:11 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 18 May 2007 21:11:39 +0000 (21:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7315 d7cf8633-e32d-0410-b094-e92efae38249

snd_alsa.c
snd_oss.c

index a1d0c26..bed25d2 100644 (file)
@@ -63,7 +63,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
 
                if (suggested != NULL)
                {
-                       memcpy (suggested, requested, sizeof (suggested));
+                       memcpy (suggested, requested, sizeof (*suggested));
 
                        if (requested->width < 1)
                                suggested->width = 1;
index c3a67aa..c991516 100644 (file)
--- a/snd_oss.c
+++ b/snd_oss.c
@@ -61,7 +61,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
 
                if (suggested != NULL)
                {
-                       memcpy(suggested, requested, sizeof(suggested));
+                       memcpy(suggested, requested, sizeof(*suggested));
 
                        if (requested->width < 1)
                                suggested->width = 1;
@@ -116,7 +116,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
        {
                if (ioctl_param != prev_value && suggested != NULL)
                {
-                       memcpy(suggested, requested, sizeof(suggested));
+                       memcpy(suggested, requested, sizeof(*suggested));
 
                        if (ioctl_param == AFMT_S16_NE)
                                suggested->width = 2;
@@ -137,7 +137,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
        {
                if (ioctl_param != requested->channels && suggested != NULL)
                {
-                       memcpy(suggested, requested, sizeof(suggested));
+                       memcpy(suggested, requested, sizeof(*suggested));
                        suggested->channels = ioctl_param;
                }
 
@@ -154,7 +154,7 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
        {
                if ((unsigned int)ioctl_param != requested->speed && suggested != NULL)
                {
-                       memcpy(suggested, requested, sizeof(suggested));
+                       memcpy(suggested, requested, sizeof(*suggested));
                        suggested->speed = ioctl_param;
                }