diff --git a/libntfs-3g/unistr.c b/libntfs-3g/unistr.c index 5854b3b7..db8ddf42 100644 --- a/libntfs-3g/unistr.c +++ b/libntfs-3g/unistr.c @@ -1189,8 +1189,9 @@ char *ntfs_uppercase_mbs(const char *low, free(upp); upp = (char*)NULL; errno = EILSEQ; + } else { + *t = 0; } - *t = 0; } return (upp); }