libdraw: fix memory corruption bug in initdisplay()

front
cinap_lenrek 2013-01-25 14:17:41 +01:00
parent 13dbaaaf70
commit 0c4d5b8b07
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ initdisplay(char *dev, char *win, void(*error)(Display*, char*))
}
if(n==NINFO+1)
n = NINFO;
buf[n] = '\0';
info[n] = '\0';
isnew = 0;
if(n < NINFO) /* this will do for now, we need something better here */
isnew = 1;