mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-26 17:53:10 +02:00
Show address of Main in stack traces
This beats main because that expands to SDL_main and leaves everyone confused.
This commit is contained in:
parent
07fa908102
commit
0c048a9d6e
@ -100,8 +100,6 @@ void TickClient()
|
||||
Client::Ref().Tick();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]);
|
||||
|
||||
static void BlueScreen(String detailMessage, std::optional<std::vector<String>> stackTrace)
|
||||
{
|
||||
auto &engine = ui::Engine::Ref();
|
||||
@ -121,7 +119,7 @@ static void BlueScreen(String detailMessage, std::optional<std::vector<String>>
|
||||
crashInfo << "Date: " << format::UnixtimeToDate(time(NULL), "%Y-%m-%dT%H:%M:%SZ", false).FromUtf8() << "\n";
|
||||
if (stackTrace)
|
||||
{
|
||||
crashInfo << "Stack trace; main is at 0x" << Format::Hex() << intptr_t(main) << ":\n";
|
||||
crashInfo << "Stack trace; Main is at 0x" << Format::Hex() << intptr_t(Main) << ":\n";
|
||||
for (auto &item : *stackTrace)
|
||||
{
|
||||
crashInfo << " - " << item << "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user