AC thanks to UVAtoolkit.com.
The problem was with the AreDigitsUnique function. It had to keep track of the counts of the digits, but it had a break statement which was causing trouble for:
printf("%d", AreDigitsUnique(33458, 16729));