Skip to content

Commit 6266fe1

Browse files
committed
Encode unicode characters with code > Int16.MaxValue
1 parent 4f52cb6 commit 6266fe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rubberduck.Parsing/VBA/Extensions/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static string ToVbExpression(this string managed, bool useConsts = true)
170170
tokens.Add($"\"{literal}\"");
171171
literal = string.Empty;
172172
}
173-
tokens.Add($"ChrW$(&H{Convert.ToInt16(character):X})");
173+
tokens.Add($"ChrW$(&H{Convert.ToInt32(character):X})");
174174
}
175175

176176
}

0 commit comments

Comments
 (0)