Negative Numbers in Kadane's Algorithm

Doesnt this algo fail if all the numbers are negative?

Yes, thats true that Kadane’s algo will fail when all nos are negative, thus atleast one no should be positive atleast for it to work properly.