Skip to content

Commit

Permalink
fix crash on empty lines (looking at you TP53)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbnjay committed Mar 19, 2019
1 parent 3ddb4ab commit d1b3e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/uniprot.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func GetUniprotGraphicData(accession string) (*GraphicResponse, error) {
////////////////////////////
case "FT":
/// https://web.expasy.org/docs/userman.html#FT_line
if strings.TrimSpace(line[:29]) == "" {
if len(line) < 30 || strings.TrimSpace(line[:29]) == "" {
// continuation of previous line's description (ignored)
continue
}
Expand Down

0 comments on commit d1b3e68

Please sign in to comment.