aboutsummaryrefslogtreecommitdiff
path: root/core/strings
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-08-16 12:38:27 +0100
committerGitHub <noreply@github.com>2024-08-16 12:38:27 +0100
commit31bb3dc4f07141430448686ffed46bf830b828b5 (patch)
treefc434540e7580796e14c9e84babf313e63ceb2a5 /core/strings
parent65ce7687d7b8892f20a9967e41a58e14fa5d9caa (diff)
parent07a9c69714fa8700ae888e9a52988afc760ba9ff (diff)
Merge pull request #3971 from jasonKercher/os2-process-linux
os2 process linux implementation
Diffstat (limited to 'core/strings')
-rw-r--r--core/strings/strings.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index be4275e8b..c05bdd255 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -2063,7 +2063,10 @@ replace :: proc(s, old, new: string, n: int, allocator := context.allocator, loc
}
- t := make([]byte, len(s) + byte_count*(len(new) - len(old)), allocator, loc)
+ t, err := make([]byte, len(s) + byte_count*(len(new) - len(old)), allocator, loc)
+ if err != nil {
+ return
+ }
was_allocation = true
w := 0