Fix a GUIErrorFactory out of bound bug.
This commit is contained in:
@@ -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 级别
|
||||||
|
|||||||
Reference in New Issue
Block a user