Handle null terminator in string reverse