X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=libexfat%2Futils.c;h=0d3b809218c37acd4c347bfd86614dd97997b49f;hp=388f360d975af01cfd479a64e5220fbf0f18e53d;hb=refs%2Ftags%2Fupstream%2F1.2.4;hpb=fc55662109c1fccea581594f8d6af49da79f456b diff --git a/libexfat/utils.c b/libexfat/utils.c index 388f360..0d3b809 100644 --- a/libexfat/utils.c +++ b/libexfat/utils.c @@ -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);