mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 17:42:40 -06:00
5ddd382a9b
While likely very uncommon, this sanitizes the input and does nothing in the event of the length being equal to or less than zero, avoiding constructing a std::string when there's no need to. It also avoids an out-of-memory scenario, as a negative value would wrap around to its equivalent unsigned representation in std::string's constructor. e.g. If someone was silly and a length of -1 was specified, this would make a string with a length of 0xFFFFFFFFFFFFFFFF on a 64-bit platform, which will obviously eventually fail due to the allocation being way too large. |
||
---|---|---|
.. | ||
audio_core | ||
citra | ||
citra_qt | ||
common | ||
core | ||
dedicated_room | ||
input_common | ||
network | ||
tests | ||
video_core | ||
web_service | ||
.clang-format | ||
CMakeLists.txt |