Răsfoiți Sursa

Fixed some large-file stack overflow issues

Brian Fiete 5 ani în urmă
părinte
comite
82d2963a9e
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      IDE/src/ui/SourceViewPanel.bf
  2. 1 1
      IDE/src/util/SourceHash.bf

+ 1 - 1
IDE/src/ui/SourceViewPanel.bf

@@ -1242,7 +1242,7 @@ namespace IDE.ui
 				chars[i] = (char8)char8Data[i].mChar;
 			}
 
-		    String text = scope String(chars, 0, chars.Count);
+		    String text = scope String()..Append(StringView(chars, 0, chars.Count));
 		    
 		    BfProject bfProject = null;
 		    if ((projectSource != null) && (mIsBeefSource))

+ 1 - 1
IDE/src/util/SourceHash.bf

@@ -55,7 +55,7 @@ namespace IDE.util
 			{
 				if (lineEndingKind == .CrLf)
 				{
-					String newStr = scope .(str);
+					String newStr = scope .(8192)..Append(str);
 					newStr.Replace("\n", "\r\n");
 					return Create(kind, newStr);
 				}