X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=libexfat%2Fnode.c;h=1ccb1c9eda0d41ddb70f64496563cd9f5e3a1472;hp=b544bd966d1cd7ff8f3733b89909e3cc588b0e68;hb=23065231e2de34b851503c9cb92465fa6333f1c0;hpb=3639f26edacd0198b1d3e4834000a88b6a43612c diff --git a/libexfat/node.c b/libexfat/node.c index b544bd9..1ccb1c9 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -3,7 +3,7 @@ exFAT file system implementation library. Free exFAT implementation. - Copyright (C) 2010-2017 Andrew Nayenko + Copyright (C) 2010-2018 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 @@ -855,7 +855,8 @@ static int find_slot(struct exfat* ef, struct exfat_node* dir, free(dmap); return -EIO; case -EINVAL: - /* slot is occupied, continue searching */ + /* slot at (i-n) is occupied, go back and check (i-n+1) */ + i -= contiguous - 1; contiguous = 0; break; }