From: Eric Biggers Date: Tue, 14 May 2013 15:55:25 +0000 (-0500) Subject: dentry.c: Fix warning when substituting forbidden characters X-Git-Tag: v1.4.0~53 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=3701706978cb45511cc41ad650a441799b265cc8 dentry.c: Fix warning when substituting forbidden characters --- diff --git a/src/dentry.c b/src/dentry.c index cf6abec5..6e13d3d6 100644 --- a/src/dentry.c +++ b/src/dentry.c @@ -1301,11 +1301,6 @@ replace_forbidden_characters(utf16lechar *name) if (*p == cpu_to_le16('/')) #endif { - #ifdef __WIN32__ - *p = cpu_to_le16(0xfffd); - #else - *p = cpu_to_le16('?'); - #endif if (name) { WARNING("File, directory, or stream name \"%"WS"\"\n" " contains forbidden characters; " @@ -1313,6 +1308,11 @@ replace_forbidden_characters(utf16lechar *name) name); name = NULL; } + #ifdef __WIN32__ + *p = cpu_to_le16(0xfffd); + #else + *p = cpu_to_le16('?'); + #endif } } }