mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #27428 - avr1254:master, r=jdm
Fixed usage of wrong delete <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix # 27398 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they edit existing code. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
c6a3dcb90d
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ std::wstring format(const std::wstring &txt, Args... args) {
|
||||||
auto ptr = new wchar_t[size];
|
auto ptr = new wchar_t[size];
|
||||||
swprintf(ptr, size, txt.c_str(), args...);
|
swprintf(ptr, size, txt.c_str(), args...);
|
||||||
auto wstr = std::wstring(ptr);
|
auto wstr = std::wstring(ptr);
|
||||||
delete ptr;
|
delete[] ptr;
|
||||||
return wstr;
|
return wstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue