Skip to content

Commit

Permalink
fix: GetCStrings for only sec.Name == "__cstring"
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jul 10, 2024
1 parent 25a8f48 commit aa502a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion file.go
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ func (f *File) GetCStrings() ([]string, error) {
var strs []string

for _, sec := range f.Sections {
if sec.Flags.IsCstringLiterals() {
if sec.Flags.IsCstringLiterals() && sec.Name == "__cstring" {
off, err := f.GetOffset(sec.Addr)
if err != nil {
return nil, fmt.Errorf("failed to get offset for %s.%s: %v", sec.Seg, sec.Name, err)
Expand Down

0 comments on commit aa502a5

Please sign in to comment.