X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=libexfat%2Flookup.c;h=30b64108df127d8b112de346fa019cf1e51b36d7;hp=d5bb3899bd152ed16b07ed725a1fa3090249f833;hb=62ddc92d38808bea3aba8fe70e3a417197e9d42f;hpb=fc55662109c1fccea581594f8d6af49da79f456b diff --git a/libexfat/lookup.c b/libexfat/lookup.c index d5bb389..30b6410 100644 --- a/libexfat/lookup.c +++ b/libexfat/lookup.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 @@ -61,10 +61,7 @@ struct exfat_node* exfat_readdir(struct exfat* ef, struct exfat_iterator* it) static int compare_char(struct exfat* ef, uint16_t a, uint16_t b) { - if (a >= ef->upcase_chars || b >= ef->upcase_chars) - return (int) a - (int) b; - - return (int) le16_to_cpu(ef->upcase[a]) - (int) le16_to_cpu(ef->upcase[b]); + return (int) ef->upcase[a] - (int) ef->upcase[b]; } static int compare_name(struct exfat* ef, const le16_t* a, const le16_t* b)