fix: use \G have no ; end

This commit is contained in:
Alex Duan 2024-01-07 15:10:57 +08:00
parent 96947e24d7
commit fbfa1c9abe
1 changed files with 6 additions and 1 deletions

View File

@ -202,7 +202,7 @@ char * strendG(const char* pstr) {
}
size_t len = strlen(pstr);
if(len < 3) {
if(len < 4) {
return NULL;
}
@ -211,6 +211,11 @@ char * strendG(const char* pstr) {
return p;
}
p = (char *)pstr + len - 3;
if (strcmp(p, "\\G;") == 0) {
return p;
}
return NULL;
}