Fix Coverity #159.

This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.

Will backport (assuming it's necessary)
1 file changed