Parcourir la source

Remove bug

When called more times than it can launch  program (not enough command in rc
file) the program was not displaying a message first, only an blank line.
This was found thanks to @RomFouq.

Number was already incremented. I add a more strict condition to solve the
problem.

TODO: Use more explicit code.
Leo il y a 10 ans
Parent
commit
4d20125a03
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/exec_cmd.ml

+ 1 - 1
src/exec_cmd.ml

@@ -39,7 +39,7 @@ open Core.Std;;
 (* Function to return the corresponding command to a number *)
 let num_cmd_to_cmd ~cmd_list number =
   (* Verify that the number is not out of the list *)
-  if (List.length cmd_list) < number
+  if (List.length cmd_list) <= number
   then
       begin
           (* TODO Make this printing configurable *)