mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
fix(error): fix shitcode where SetCount(-1) gets called
This commit is contained in:
parent
9722c1e8c3
commit
22e9686d64
1 changed files with 3 additions and 1 deletions
|
|
@ -38,6 +38,8 @@ class error_report {
|
||||||
this->m_linenumber = linenumber;
|
this->m_linenumber = linenumber;
|
||||||
this->m_description = description;
|
this->m_description = description;
|
||||||
this->m_recoverable = recoverable;
|
this->m_recoverable = recoverable;
|
||||||
|
this->m_text.SetCount(1);
|
||||||
|
this->m_text[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void Format() {
|
void Format() {
|
||||||
|
|
@ -85,7 +87,7 @@ class error_report {
|
||||||
int32_t SErrDisplayError(uint32_t errorcode, const char* filename, int32_t linenumber, const char* description, int32_t recoverable, uint32_t exitcode, uint32_t a7) {
|
int32_t SErrDisplayError(uint32_t errorcode, const char* filename, int32_t linenumber, const char* description, int32_t recoverable, uint32_t exitcode, uint32_t a7) {
|
||||||
error_report report(errorcode, filename, linenumber, description, recoverable);
|
error_report report(errorcode, filename, linenumber, description, recoverable);
|
||||||
|
|
||||||
// Format error string and write to debug console
|
// Format error message
|
||||||
report.Format();
|
report.Format();
|
||||||
// Show MessageBox (blocks until user response)
|
// Show MessageBox (blocks until user response)
|
||||||
report.Display();
|
report.Display();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue