diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c index 4b1c8da2..0dbe450e 100644 --- a/source/dialogs/dmenu.c +++ b/source/dialogs/dmenu.c @@ -203,7 +203,7 @@ int dmenu_switcher_dialog ( char **input ) fflush ( stdout ); restart = FALSE; - retv = -( mretv & MENU_LOWER_MASK ) - 1; + retv = 10+ ( mretv & MENU_LOWER_MASK ) ; } } while ( restart ); diff --git a/source/rofi.c b/source/rofi.c index 0f00dd21..74f232ea 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -1763,8 +1763,8 @@ int main ( int argc, char *argv[] ) if ( retv == FALSE ) { return EXIT_FAILURE; } - else if ( retv < 0 ) { - return -retv; + else if ( retv >= 10 ) { + return retv; } return EXIT_SUCCESS; }