Skip to content

Commit 3fd550c

Browse files
authored
Update ParserClass.gd
Fix broken umlaut in strings.
1 parent 751241d commit 3fd550c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addons/Seriously/ParserClass.gd

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ func TYPE_REAL_unpack(stream: StreamPeerBuffer) -> float:
113113
# String
114114
func TYPE_STRING_pack(value: String, stream: StreamPeerBuffer, add_type := true):
115115
if add_type: stream.put_u8(TYPES.TYPE_STRING)
116-
stream.put_u16(value.length())
117-
stream.put_data(value.to_utf8())
116+
# TODO: Find a better solution to parse strings. While this works, causes alot of overhead.
117+
stream.put_utf8_string(value)
118118
func TYPE_STRING_unpack(stream: StreamPeerBuffer) -> String:
119-
return stream.get_utf8_string(stream.get_u16())
119+
return stream.get_utf8_string()
120120

121121
# Rect2
122122
func TYPE_RECT2_pack(value: Rect2, stream: StreamPeerBuffer, add_type := true):

0 commit comments

Comments
 (0)