Skip to content

Commit 1173385

Browse files
Updated unary expr to use Sprintf param
1 parent 085a6e2 commit 1173385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/go2cs2/convUnaryExpr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (v *Visitor) convUnaryExpr(unaryExpr *ast.UnaryExpr) string {
1717
if strings.HasPrefix(typeName, "[") {
1818
// For an indexed reference into an array or slice, we use the "ptr.at<T>(index)" syntax
1919
csTypeName := convertToCSTypeName(typeName[strings.Index(typeName, "]")+1:])
20-
return fmt.Sprintf("%s.at<%s>(%s)", AddressPrefix+v.convExpr(indexExpr.X, nil), csTypeName, v.convExpr(indexExpr.Index, nil))
20+
return fmt.Sprintf("%s%s.at<%s>(%s)", AddressPrefix, v.convExpr(indexExpr.X, nil), csTypeName, v.convExpr(indexExpr.Index, nil))
2121
}
2222
}
2323

0 commit comments

Comments
 (0)