am 1276f7ba: am 0e981c83: EmuGL: Fix heap corruption

* commit '1276f7ba042be1d54e56c432f0cb89c4164f266c':
  EmuGL: Fix heap corruption
This commit is contained in:
Jesse Hall
2012-02-06 13:37:39 -08:00
committed by Android Git Automerger

View File

@@ -394,7 +394,7 @@ void GLClientState::deleteTextures(GLsizei n, const GLuint* textures)
if (texrec) {
const TextureRec* end = m_tex.textures + m_tex.numTextures;
memmove(texrec, texrec + 1,
(end - texrec + 1) * sizeof(TextureRec));
(end - texrec - 1) * sizeof(TextureRec));
m_tex.numTextures--;
for (TextureUnit* unit = m_tex.unit;