mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Use strstr instead of strnstr.
This commit is contained in:
parent
c953f2ed1d
commit
021c7dd0d2
1 changed files with 1 additions and 1 deletions
|
@ -495,7 +495,7 @@ static void* load_image_fn(sexp ctx, sexp dl, sexp name) {
|
||||||
sexp_dl_handle(dl) = dlopen(file_name, RTLD_LAZY);
|
sexp_dl_handle(dl) = dlopen(file_name, RTLD_LAZY);
|
||||||
if (!sexp_dl_handle(dl)) {
|
if (!sexp_dl_handle(dl)) {
|
||||||
for (ls = sexp_global(ctx, SEXP_G_MODULE_PATH); sexp_pairp(ls); ls=sexp_cdr(ls)) {
|
for (ls = sexp_global(ctx, SEXP_G_MODULE_PATH); sexp_pairp(ls); ls=sexp_cdr(ls)) {
|
||||||
if (strnstr(file_name, sexp_string_data(sexp_car(ls)), len+1)) {
|
if (strstr(file_name, sexp_string_data(sexp_car(ls))) == file_name) {
|
||||||
rel_name = file_name + sexp_string_size(sexp_car(ls));
|
rel_name = file_name + sexp_string_size(sexp_car(ls));
|
||||||
while (*rel_name == '/')
|
while (*rel_name == '/')
|
||||||
++rel_name;
|
++rel_name;
|
||||||
|
|
Loading…
Add table
Reference in a new issue