mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 06:38:37 -04:00 
			
		
		
		
	Fix panic when adding long comment (#12892)
Previous PR #12881 causes out of bounds panic by working on wrong string.
This commit is contained in:
		| @@ -102,7 +102,7 @@ func (a *actionNotifier) NotifyCreateIssueComment(doer *models.User, repo *model | ||||
| 	content := "" | ||||
|  | ||||
| 	if len(comment.Content) > 200 { | ||||
| 		content = content[:strings.LastIndex(comment.Content[0:200], " ")] + "…" | ||||
| 		content = comment.Content[:strings.LastIndex(comment.Content[0:200], " ")] + "…" | ||||
| 	} else { | ||||
| 		content = comment.Content | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user