Bug 653 bugfix

This commit is contained in:
Szymon Wilczek 2009-01-03 12:00:20 +00:00
parent c1137076fc
commit 02bdfb7930

View File

@ -85,7 +85,7 @@ WIN_InitMouse(_THIS)
continue;
}
buffer = SDL_malloc((tmp + 1) * sizeof(char));
key_name = SDL_malloc(tmp + sizeof(reg_key_root) * sizeof(char));
key_name = SDL_malloc((tmp + SDL_strlen(reg_key_root) + 1) * sizeof(char));
/* we're getting the device registry path and polishing it to get it's name,
surely there must be an easier way, but we haven't found it yet */
@ -125,6 +125,9 @@ WIN_InitMouse(_THIS)
}
}
}
buffer -= 4;
if (is_rdp == 1) {
SDL_free(buffer);
SDL_free(key_name);