mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Extended memory loading support
This commit is contained in:
parent
0efdecb719
commit
29c0f82bba
7 changed files with 136 additions and 33 deletions
|
@ -1380,6 +1380,16 @@ void Beefy::BFFatalError(const char* message, const char* file, int line)
|
|||
BFFatalError(String(message), String(file), line);
|
||||
}
|
||||
|
||||
void MakeUpper(const StringImpl& theString)
|
||||
bool Beefy::ParseMemorySpan(const StringImpl& str, void*& outPtr, int& outSize)
|
||||
{
|
||||
if (str.StartsWith("@"))
|
||||
{
|
||||
int colon = (int)str.IndexOf(':');
|
||||
String addrStr = str.Substring(1, colon - 1);
|
||||
String lenStr = str.Substring(colon + 1);
|
||||
outPtr = (void*)(intptr)strtoll(addrStr.c_str(), NULL, 16);
|
||||
outSize = (int)strtol(lenStr.c_str(), NULL, 10);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue