Commit db8171f
Remove dependency on
The `wcsnlen` function is not consistently available across all target environments. Its prior use was intended as a micro-optimization and safeguard to limit string scanning to the remaining buffer size and prevent potential issues with malformed strings lacking a null terminator.
This change now relies on the implicit `std::wstring_view` constructor to determine the string length. `CopyToEncodedBuffer` will continue to handle truncation effectively, mitigating the original concerns.
PiperOrigin-RevId: 756378282
Change-Id: I858bad01724507f7926f868aa300eabad8a4358cwcsnlen for string length calculation.1 parent 1b52dcb commit db8171f
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | | - | |
429 | | - | |
| 427 | + | |
430 | 428 | | |
431 | 429 | | |
432 | 430 | | |
| |||
0 commit comments