]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Fix
authorDale Weiler <killfieldengine@gmail.com>
Wed, 14 Aug 2013 04:27:11 +0000 (04:27 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Wed, 14 Aug 2013 04:27:11 +0000 (04:27 +0000)
util.c

diff --git a/util.c b/util.c
index ecae50516514e45db673cd10966ac408a010b0d1..32edbbd73b3baf59cf69026a804d2ae712067597 100644 (file)
--- a/util.c
+++ b/util.c
@@ -234,7 +234,7 @@ static GMQCC_INLINE size_t util_strtransform(const char *in, char *out, size_t o
     for (; *in && sz < outsz; ++in, ++out, ++sz) {
         *out = (*in == mod[0])
                     ? mod[1]
-                    : (util_isalpha(*in) && util_isupper(*in + add))
+                    : (util_isalpha(*in) && ((add > 0) ? util_isupper(*in) : !util_isupper(*in)))
                         ? *in + add
                         : *in;
     }