Commit cf5bc083 authored by Szymon Wilczek's avatar Szymon Wilczek

Bug 653 bugfix

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403442
parent 7ed73609
...@@ -85,7 +85,7 @@ WIN_InitMouse(_THIS) ...@@ -85,7 +85,7 @@ WIN_InitMouse(_THIS)
continue; continue;
} }
buffer = SDL_malloc((tmp + 1) * sizeof(char)); 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, /* 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 */ surely there must be an easier way, but we haven't found it yet */
...@@ -125,6 +125,9 @@ WIN_InitMouse(_THIS) ...@@ -125,6 +125,9 @@ WIN_InitMouse(_THIS)
} }
} }
} }
buffer -= 4;
if (is_rdp == 1) { if (is_rdp == 1) {
SDL_free(buffer); SDL_free(buffer);
SDL_free(key_name); SDL_free(key_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment