Skip to content

Commit

Permalink
ConverMediaToTGStickerSmart: Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
star-39 committed May 28, 2024
1 parent 1f54460 commit c0f57c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/msbimport/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,12 @@ func ConverMediaToTGStickerSmart(f string, isCustomEmoji bool) (string, error) {
}
//IM might get buggy and return insane frame count causing overflow.
//Trim it.
identifyOut = identifyOut[:2]
identifyOutString := string(identifyOut)
if len(identifyOutString) > 5 {
identifyOutString = identifyOutString[:3]
}

frameCount, err := strconv.Atoi(string(identifyOut))
frameCount, err := strconv.Atoi(identifyOutString)
if err != nil {
log.Warnln("ConverMediaToTGStickerSmart Atoi ERROR:", err)
return "", err
Expand Down

0 comments on commit c0f57c3

Please sign in to comment.