From ccd1ad0fd7b45d31ef1b9bef7f76800b894f1d81 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Fri, 7 Feb 2014 15:57:36 +0100 Subject: [PATCH] [GL] Do not limit strings to StringBuilder.Capacity. Fixes issue #57 We let StringBuilder grow to fit the unmanaged string. This appears to match the default CLR marshaling behavior, which was used in OpenTK 1.0. --- Source/OpenTK/BindingsBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/BindingsBase.cs b/Source/OpenTK/BindingsBase.cs index acc5738a..dee9caa2 100644 --- a/Source/OpenTK/BindingsBase.cs +++ b/Source/OpenTK/BindingsBase.cs @@ -133,7 +133,7 @@ namespace OpenTK throw new ArgumentNullException("sb"); sb.Length = 0; - for (int i = 0; i < sb.Capacity; i++) + for (int i = 0; ; i++) { byte b = Marshal.ReadByte(ptr, i); if (b == 0)