In criminal cases and where the accused has been convicted, if the judgment has pronounced a penalty other than that applied by law to the nature of the crime, the annulment of the judgment may be pursued both by the public prosecutor and by the convicted party.