Kadane's algorithm related to negative input

if all array elements are negative then how to find maxsub array sum using kadane’s algorithm as it is going to give 0 as output.

kadane’s algorithm work on negative no as well
if you are getting any problem then send your code’s link