mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 04:31:52 +00:00
CurApName
This commit is contained in:
parent
8036aa1cc3
commit
cb17bd3bce
@ -201,8 +201,7 @@ uint32_t load(const char *file)
|
|||||||
void InitializeMPW(int argc, char **argv)
|
void InitializeMPW(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 0x0910 is a pointer to a 32-char (max) pstring
|
// 0x0910 CurApName
|
||||||
// with the program name.
|
|
||||||
{
|
{
|
||||||
char str32[32];
|
char str32[32];
|
||||||
int l = strlen(argv[0]);
|
int l = strlen(argv[0]);
|
||||||
@ -211,9 +210,7 @@ void InitializeMPW(int argc, char **argv)
|
|||||||
memcpy(str32 + 1, argv[0], l);
|
memcpy(str32 + 1, argv[0], l);
|
||||||
while (l < 32) str32[l++] = 0;
|
while (l < 32) str32[l++] = 0;
|
||||||
|
|
||||||
uint32_t address = EmulatedNewPtr(32);
|
memcpy(memory + 0x910, str32, 32);
|
||||||
memcpy(memory + address, str32, 32);
|
|
||||||
WriteLong(memory, 0x0910, address);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user