Skip to content

Commit a3e8e1f

Browse files
committed
Fix decompiling attachment values
1 parent b56e49b commit a3e8e1f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

decompile.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,10 +977,12 @@ func decompAttachmentString(attachmentString *string, attachments map[string]int
977977

978978
*attachmentString = escapeString(strings.Join(attachmentChars, ""))
979979

980-
if (!decompilingDictionary && !decompilingText) && len(attachments) == 1 && originalString == ObjectReplaceCharStr {
981-
*attachmentString = strings.Trim(*attachmentString, "{}")
982-
} else if strings.Contains("\"", *attachmentString) {
983-
*attachmentString = fmt.Sprintf("\"%s\"", *attachmentString)
980+
if !decompilingDictionary && !decompilingText {
981+
if originalString == ObjectReplaceCharStr {
982+
*attachmentString = strings.Trim(*attachmentString, "{}")
983+
} else if !strings.Contains("\"", *attachmentString) {
984+
*attachmentString = fmt.Sprintf("\"%s\"", *attachmentString)
985+
}
984986
}
985987
}
986988

0 commit comments

Comments
 (0)