]> git.sven.stormbind.net Git - sven/exfat-utils.git/blobdiff - libexfat/utils.c
Imported Upstream version 1.2.4
[sven/exfat-utils.git] / libexfat / utils.c
index 388f360d975af01cfd479a64e5220fbf0f18e53d..0d3b809218c37acd4c347bfd86614dd97997b49f 100644 (file)
@@ -3,7 +3,7 @@
        exFAT file system implementation library.
 
        Free exFAT implementation.
-       Copyright (C) 2010-2015  Andrew Nayenko
+       Copyright (C) 2010-2016  Andrew Nayenko
 
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
@@ -124,8 +124,7 @@ le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name)
                uint16_t c = le16_to_cpu(name[i]);
 
                /* convert to upper case */
-               if (c < ef->upcase_chars)
-                       c = le16_to_cpu(ef->upcase[c]);
+               c = ef->upcase[c];
 
                hash = ((hash << 15) | (hash >> 1)) + (c & 0xff);
                hash = ((hash << 15) | (hash >> 1)) + (c >> 8);