src/init.c: bail out if skin_name or font_name is "".
Fixes a crash on AROS src/filesel.c: fixed BSTR conversion routine for AROS. Without this fix "RAM DISK" was printed as "AM DISK" in the file selector. src/setup.c: removed slash to avoid that paths like "PROGDIR:/share" are created on AROS. That fix should be right for all Amiga like OS but I don't want to change things which I can't test. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1970 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -470,16 +470,21 @@ void bstrtostr( BSTR in, STRPTR out, TEXT max )
|
||||
{
|
||||
STRPTR iptr;
|
||||
dword i;
|
||||
|
||||
iptr = BADDR( in );
|
||||
|
||||
if( max > iptr[0] ) max = iptr[0];
|
||||
dword len;
|
||||
|
||||
#if defined(__AROS__)
|
||||
for ( i=0 ; i<max ; i++ ) out[i] = *(AROS_BSTR_ADDR(iptr+i));
|
||||
iptr = AROS_BSTR_ADDR( in );
|
||||
len = AROS_BSTR_strlen( in );
|
||||
#else
|
||||
for( i=0; i<max; i++ ) out[i] = iptr[i+1];
|
||||
iptr = BADDR( in );
|
||||
len = iptr[0];
|
||||
iptr++;
|
||||
#endif
|
||||
|
||||
if( max > len ) max = len;
|
||||
|
||||
for( i=0; i<max; i++ , iptr++ ) out[i] = *iptr;
|
||||
|
||||
out[i] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user