Skip to content

Commit

Permalink
Updated unary expr to use Sprintf param
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchiecarroll committed Oct 12, 2024
1 parent 085a6e2 commit 1173385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go2cs2/convUnaryExpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (v *Visitor) convUnaryExpr(unaryExpr *ast.UnaryExpr) string {
if strings.HasPrefix(typeName, "[") {
// For an indexed reference into an array or slice, we use the "ptr.at<T>(index)" syntax
csTypeName := convertToCSTypeName(typeName[strings.Index(typeName, "]")+1:])
return fmt.Sprintf("%s.at<%s>(%s)", AddressPrefix+v.convExpr(indexExpr.X, nil), csTypeName, v.convExpr(indexExpr.Index, nil))
return fmt.Sprintf("%s%s.at<%s>(%s)", AddressPrefix, v.convExpr(indexExpr.X, nil), csTypeName, v.convExpr(indexExpr.Index, nil))
}
}

Expand Down

0 comments on commit 1173385

Please sign in to comment.