mirror of
https://github.com/ctm/executor.git
synced 2025-01-03 00:31:03 +00:00
Fixed bug that was causing Executor to crash on systems where argv[0] isn't guaranteed to have a slash in it (e.g., Fedora 12).
This commit is contained in:
parent
44c8a96e32
commit
12a845ba9e
@ -722,9 +722,11 @@ A1(PRIVATE, void, setstartdir, char *, argv0)
|
||||
misc_self_examination (lookhere);
|
||||
#endif
|
||||
suffix = rindex(lookhere, '/');
|
||||
if (suffix)
|
||||
*suffix = 0;
|
||||
getcwd(savedir, sizeof savedir);
|
||||
Uchdir(lookhere);
|
||||
if (suffix)
|
||||
*suffix = '/';
|
||||
getcwd(ROMlib_startdir, sizeof ROMlib_startdir);
|
||||
Uchdir(savedir);
|
||||
|
Loading…
Reference in New Issue
Block a user