Fix a GUIErrorFactory out of bound bug.

This commit is contained in:
Krad
2022-01-25 09:23:11 +08:00
parent aae9d8da2f
commit d44671fb93

View File

@@ -10,7 +10,7 @@ GUIErrorBase *GUIErrorFactory::getError(const QString &errorMsg) {
if (errorMsg.isEmpty()) return new GUIErrorBase; if (errorMsg.isEmpty()) return new GUIErrorBase;
//新模式,分级 //新模式,分级
if (errorMsg[1] == ' ') { if (errorMsg.length()>1 && errorMsg[1] == ' ') {
char c = errorMsg[0].toLower().toLatin1(); char c = errorMsg[0].toLower().toLatin1();
switch (c) { switch (c) {
//WARN 级别 //WARN 级别