We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f51083f commit 61a088aCopy full SHA for 61a088a
src/node_url.cc
@@ -582,9 +582,7 @@ std::string URLHost::ToString() const {
582
dest.reserve(15);
583
uint32_t value = value_.ipv4;
584
for (int n = 0; n < 4; n++) {
585
- char buf[4];
586
- snprintf(buf, sizeof(buf), "%d", value % 256);
587
- dest.insert(0, buf);
+ dest.insert(0, std::to_string(value % 256));
588
if (n < 3)
589
dest.insert(0, 1, '.');
590
value /= 256;
0 commit comments