]> git.sven.stormbind.net Git - sven/exfat-utils.git/blobdiff - libexfat/lookup.c
Imported Upstream version 1.2.4
[sven/exfat-utils.git] / libexfat / lookup.c
index d5bb3899bd152ed16b07ed725a1fa3090249f833..30b64108df127d8b112de346fa019cf1e51b36d7 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
@@ -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)