mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Fix protection error when checking if there's a cookie jar in Atari ST.
This commit is contained in:
@@ -35,14 +35,20 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void Links(const char* path)
|
||||
{
|
||||
long** cookieJar = _p_cookies;
|
||||
long cookie;
|
||||
int rc;
|
||||
FILE* h;
|
||||
char driveNo = path[0] - '@';
|
||||
long* cookieJar;
|
||||
long cookie;
|
||||
int rc;
|
||||
FILE* h;
|
||||
char driveNo = path[0] - '@';
|
||||
long savessp;
|
||||
|
||||
// Retrieve pointer to cookie jar in Supervisor mode
|
||||
savessp = Super(0L);
|
||||
cookieJar = *_p_cookies;
|
||||
Super((void*)savessp);
|
||||
|
||||
// Check for a cookie jar
|
||||
if(*cookieJar == 0) return;
|
||||
if(cookieJar == 0) return;
|
||||
|
||||
// Check if MiNT or MagiC
|
||||
rc = (Getcookie(C_MiNT, &cookie) == E_OK) || (Getcookie(C_MagX, &cookie) == E_OK) ||
|
||||
|
||||
@@ -41,14 +41,14 @@ void GetOsInfo()
|
||||
{
|
||||
OSHEADER* osHeader;
|
||||
unsigned short version;
|
||||
long** cookieJar = _p_cookies;
|
||||
long cookie = 0;
|
||||
long* cookieJar;
|
||||
long cookie = 0;
|
||||
char type[5];
|
||||
int rc;
|
||||
struct _stemu_vars* stemu_vars;
|
||||
struct _tos2win_vars* tos2win_vars;
|
||||
MAGX_COOKIE* magic_vars;
|
||||
int32_t savessp;
|
||||
long savessp;
|
||||
|
||||
// Retrieve the OS data in Supervisor mode
|
||||
savessp = Super(0L);
|
||||
@@ -93,8 +93,13 @@ void GetOsInfo()
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve pointer to cookie jar in Supervisor mode
|
||||
savessp = Super(0L);
|
||||
cookieJar = *_p_cookies;
|
||||
Super((void*)savessp);
|
||||
|
||||
// Check for a cookie jar
|
||||
if(*cookieJar == 0) return;
|
||||
if(cookieJar == 0) return;
|
||||
|
||||
// KAOS TOS
|
||||
rc = Getcookie(C__T30, &cookie);
|
||||
|
||||
@@ -37,14 +37,20 @@ Copyright (C) 2011-2021 Natalia Portillo
|
||||
|
||||
void FilePermissions(const char* path)
|
||||
{
|
||||
long** cookieJar = _p_cookies;
|
||||
long cookie;
|
||||
int rc, cRc, i;
|
||||
FILE* file;
|
||||
char driveNo = path[0] - '@';
|
||||
long* cookieJar;
|
||||
long cookie;
|
||||
int rc, cRc, i;
|
||||
FILE* file;
|
||||
char driveNo = path[0] - '@';
|
||||
long savessp;
|
||||
|
||||
// Retrieve pointer to cookie jar in Supervisor mode
|
||||
savessp = Super(0L);
|
||||
cookieJar = *_p_cookies;
|
||||
Super((void*)savessp);
|
||||
|
||||
// Check for a cookie jar
|
||||
if(*cookieJar == 0) return;
|
||||
if(cookieJar == 0) return;
|
||||
|
||||
// Check if MiNT or MagiC
|
||||
rc = (Getcookie(C_MiNT, &cookie) == E_OK) || (Getcookie(C_MagX, &cookie) == E_OK) ||
|
||||
|
||||
Reference in New Issue
Block a user