[INTERPRETER]
* BUG: Fix startup current directory detection when running an archive. * BUG: Using a Variant where a stream is requested does not crash the interpreter anymore. git-svn-id: svn://localhost/gambas/trunk@3276 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
bcd8f6ff1f
commit
1a8c82215c
@ -343,10 +343,12 @@ void PROJECT_init(const char *file)
|
||||
}
|
||||
|
||||
if (EXEC_arch)
|
||||
{
|
||||
if (FILE_is_absolute(file))
|
||||
{
|
||||
path = FILE_get_dir(file);
|
||||
|
||||
FILE_chdir(path);
|
||||
}
|
||||
|
||||
path = FILE_getcwd(NULL);
|
||||
if (path == NULL)
|
||||
|
@ -117,6 +117,8 @@ static STREAM *get_default(intptr_t val)
|
||||
({ \
|
||||
STREAM *stream; \
|
||||
\
|
||||
VARIANT_undo(_value); \
|
||||
\
|
||||
if ((_can_default) && TYPE_is_integer((_value)->type) && (_value)->_integer.value >= 0 && (_value)->_integer.value <= 2) \
|
||||
stream = get_default((intptr_t)(_value)->_integer.value); \
|
||||
else \
|
||||
|
Loading…
x
Reference in New Issue
Block a user