When the key was smaller than any value in the array, an error was ocurring with the mid being zero and having 1 subtracted from it.
When the key was smaller than any value in the array, an error was ocurring with the mid being zero and having 1 subtracted from it.