mirror of https://github.com/davatorium/rofi.git
Fix endline thingy in dmenu
This commit is contained in:
parent
8725748916
commit
8310a97219
|
@ -66,7 +66,8 @@ static char **get_dmenu ( )
|
|||
while ( fgets( buffer, 1024, stdin ) != NULL ) {
|
||||
retv = realloc( retv, ( index+2 )*sizeof( char* ) );
|
||||
retv[index] = strdup( buffer );
|
||||
retv[index][strlen( buffer )-1] = '\0';
|
||||
if( retv[index][strlen(buffer)-1] == '\n')
|
||||
retv[index][strlen( buffer )-1] = '\0';
|
||||
retv[index+1] = NULL;
|
||||
index++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue