From 82d2963a9e5a9690f0aec169a18dba9c90d0a4d2 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 13 Jun 2020 04:57:58 -0700 Subject: [PATCH] Fixed some large-file stack overflow issues --- IDE/src/ui/SourceViewPanel.bf | 2 +- IDE/src/util/SourceHash.bf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IDE/src/ui/SourceViewPanel.bf b/IDE/src/ui/SourceViewPanel.bf index 90017423..512a46ce 100644 --- a/IDE/src/ui/SourceViewPanel.bf +++ b/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)) diff --git a/IDE/src/util/SourceHash.bf b/IDE/src/util/SourceHash.bf index 70f784b8..062ccf49 100644 --- a/IDE/src/util/SourceHash.bf +++ b/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); }