1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Fixed off-by-one error.

This commit is contained in:
Camilla Berglund 2013-12-22 20:03:55 +01:00
parent 2b876da52d
commit cd54dc84c4

View File

@ -789,7 +789,7 @@ static void processEvent(XEvent *event)
{
// Nautilus seems to add a \r at the end of the paths
// remove it so paths can be directly used
_glfw.x11.xdnd.string = malloc(strlen(data));
_glfw.x11.xdnd.string = malloc(strlen(data) + 1);
char *to = _glfw.x11.xdnd.string;
const char *from = data;
const char *current = strchr(from, '\r');