diff --git a/src/UTF8String.cs b/src/UTF8String.cs index a6ecd41..7b09a87 100644 --- a/src/UTF8String.cs +++ b/src/UTF8String.cs @@ -126,7 +126,7 @@ namespace SDL2 { byte[] bytes = new byte[_capacity - 1]; Marshal.Copy(_handle, bytes, 0, _capacity - 1); - return Encoding.UTF8.GetString(bytes); + return Encoding.UTF8.GetString(bytes, 0, _capacity - 1); } #endif }