diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2021-03-31 10:46:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 10:46:58 +0300 |
commit | 3b1aac20842facce8f8962f058b850d0f59d4e1f (patch) | |
tree | eac9d5c7039b28a152dbf5355743b92d8f1d01d9 | |
parent | 148b851d10abb2dcb36cf2b952e9bca2561081d7 (diff) |
Reinitialise i before using it for iterating over dll_dirs
Previously, the value of it was kept from the loop over all the command-line arguments; as `/usr/lib` or `/lib` were far enough in the list, on many systems there was no difference, but `own_dir` and `LIB_DIR` could be ignored or not based on the argument count, which was confusing.
-rw-r--r-- | src/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -107,6 +107,7 @@ int main(int argc, char *argv[]) { // search DLL set_own_dir(argv[0]); + i = 0; while(dll_dirs[i]) { snprintf(buf, sizeof(buf), "%s/%s", dll_dirs[i], dll_name); if(access(buf, R_OK) != -1) { |