!17 修复sex字段切片操作时超出了字符串的有效范围

Merge pull request !17 from fyk/master
This commit is contained in:
PandaX
2024-07-08 00:15:25 +00:00
committed by Gitee

View File

@@ -109,7 +109,7 @@ func (s *toolsGenTableColumn) CheckTypeColumn(columnName string) bool {
}
func (s *toolsGenTableColumn) CheckSexColumn(columnName string) bool {
if len(columnName) >= 3 {
if len(columnName) >= 4 {
tmp := columnName[len(columnName)-4:]
return tmp == "sex"
}