Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Bug 653 bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Wilczek committed Jan 3, 2009
1 parent 56dd9f6 commit 2ec3520
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video/win32/SDL_win32mouse.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -125,6 +125,9 @@ WIN_InitMouse(_THIS)
}
}
}

buffer -= 4;

if (is_rdp == 1) {
SDL_free(buffer);
SDL_free(key_name);
Expand Down

0 comments on commit 2ec3520

Please sign in to comment.