X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/352f37e2de014cc666d8323167aa887ddf529cdc..256c29a27ba79677a78bc676a3cc73ee1aad2d68:/agedu.c diff --git a/agedu.c b/agedu.c index 246f002..a3c2db6 100644 --- a/agedu.c +++ b/agedu.c @@ -171,7 +171,8 @@ static void text_query(const void *mappedfile, const char *querydir, * (inclusive) and that filename with a ^A on the end * (exclusive). So find the x indices for each. */ - sprintf(pathbuf, "%s\001", querydir); + strcpy(pathbuf, querydir); + make_successor(pathbuf); xi1 = trie_before(mappedfile, querydir); xi2 = trie_before(mappedfile, pathbuf); @@ -196,7 +197,7 @@ static void text_query(const void *mappedfile, const char *querydir, while (xi1 < xi2) { trie_getpath(mappedfile, xi1, pathbuf); text_query(mappedfile, pathbuf, t, depth-1); - strcat(pathbuf, "\001"); + make_successor(pathbuf); xi1 = trie_before(mappedfile, pathbuf); } }