[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:
Benoît Minisini 2010-11-03 20:28:54 +00:00
parent bcd8f6ff1f
commit 1a8c82215c
2 changed files with 7 additions and 3 deletions

View File

@ -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)

View File

@ -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 \