Recursion-duplicate character formatting

Can you explain the mistake in this code ?

Recursion is wrong. If first and second characters are same, print the first character and a ‘*’ , then recur for the rest of the string.

For the else part , print the first character and then recur for rest of the string.