Correct context.allocator usage
This commit is contained in:
1 parent
2b77f5b72f
commit
ceebd7b23c
4 files changed
+18
-10
No files matched your search
@@ -680,10 +680,11 @@ unquote_string :: proc(lit: string, allocator := context.allocator) -> (res: str
|
||||
return s, false, true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
context.allocator = allocator
|
||||
|
||||
buf_len := 3*len(s) / 2
|
||||
buf := make([]byte, buf_len, allocator)
|
||||
buf := make([]byte, buf_len)
|
||||
offset := 0
|
||||
for len(s) > 0 {
|
||||
r, multiple_bytes, tail_string, ok := unquote_char(s, byte(quote))
|
||||
|
||||
Reference in new issue
Block a user