Use a better method to derive the offset from the data pointer

This commit is contained in:
Chris Robinson
2010-03-18 19:32:03 -07:00
parent a65ec178df
commit 799126df0e
+2 -2
View File
@@ -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;
}