Merge pull request #148 from riscv/macbuild

Use %ll instead of %L in scanf.
This commit is contained in:
Megan Wachs 2017-12-21 15:16:57 -08:00 committed by GitHub
commit a81ad34af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1161,7 +1161,7 @@ COMMAND_HANDLER(riscv_set_scratch_ram)
} }
long long unsigned int address; long long unsigned int address;
int result = sscanf(CMD_ARGV[0], "%Lx", &address); int result = sscanf(CMD_ARGV[0], "%llx", &address);
if (result != (int) strlen(CMD_ARGV[0])) { if (result != (int) strlen(CMD_ARGV[0])) {
LOG_ERROR("%s is not a valid address for command.", CMD_ARGV[0]); LOG_ERROR("%s is not a valid address for command.", CMD_ARGV[0]);
riscv_use_scratch_ram = false; riscv_use_scratch_ram = false;