aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-03-18 19:32:03 -0700
committerChris Robinson <[email protected]>2010-03-18 19:32:03 -0700
commit799126df0ef03548728080e2a4723394f63e5caf (patch)
treeca085c34bd4b67476560b011008aaac0a0bb67b1 /OpenAL32/alBuffer.c
parenta65ec178df80746e695950bb64a4fdea9334d07e (diff)
Use a better method to derive the offset from the data pointer
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index cd1886df..cbc10be5 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -285,7 +285,7 @@ ALAPI ALvoid ALAPIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid *d
return;
}
- offset = (ALintptrEXT)data;
+ offset = (const ALubyte*)data - (ALubyte*)NULL;
data = Context->SampleSource->data + offset;
}
@@ -534,7 +534,7 @@ ALvoid ALAPIENTRY alBufferSubDataEXT(ALuint buffer,ALenum format,const ALvoid *d
return;
}
- offset = (ALintptrEXT)data;
+ offset = (const ALubyte*)data - (ALubyte*)NULL;
data = Context->SampleSource->data + offset;
}