mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 20:43:10 +00:00
command_write_ram - cleanup
This commit is contained in:
parent
8bb74d0776
commit
b4d2281f7d
21
command.c
21
command.c
@ -324,23 +324,18 @@ static bool command_read_ram(const char *arg)
|
|||||||
static bool command_write_ram(const char *arg)
|
static bool command_write_ram(const char *arg)
|
||||||
{
|
{
|
||||||
unsigned nbytes = 0;
|
unsigned nbytes = 0;
|
||||||
uint8_t *data = NULL;
|
unsigned int addr = strtoul(arg, (char**)&arg, 16);
|
||||||
unsigned int addr = 0;
|
uint8_t *data = (uint8_t *)rcheevos_patch_address(addr, rcheevos_get_console());
|
||||||
|
|
||||||
addr = strtoul(arg, (char**)&arg, 16);
|
if (!data)
|
||||||
data = (uint8_t *)rcheevos_patch_address(addr, rcheevos_get_console());
|
return false;
|
||||||
|
|
||||||
if (data)
|
while (*arg)
|
||||||
{
|
{
|
||||||
while (*arg)
|
*data = strtoul(arg, (char**)&arg, 16);
|
||||||
{
|
data++;
|
||||||
*data = strtoul(arg, (char**)&arg, 16);
|
|
||||||
data++;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user